Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78608 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-05-25 06:16:39


Author: jurko
Date: 2012-05-25 06:16:36 EDT (Fri, 25 May 2012)
New Revision: 78608
URL: http://svn.boost.org/trac/boost/changeset/78608

Log:
Updated the SPLIT_BY_CHARACTERS builtin rule signature so invalid calls get rejected with a correct error message instead of silently causing the rule to return an empty list.
Text files modified:
   trunk/tools/build/v2/engine/builtins.c | 10 +++-------
   1 files changed, 3 insertions(+), 7 deletions(-)

Modified: trunk/tools/build/v2/engine/builtins.c
==============================================================================
--- trunk/tools/build/v2/engine/builtins.c (original)
+++ trunk/tools/build/v2/engine/builtins.c 2012-05-25 06:16:36 EDT (Fri, 25 May 2012)
@@ -161,9 +161,9 @@
                     builtin_match, 0, 0 ) );
 
     {
- const char * args[] = { "string", ":", "delimiters" };
+ const char * args[] = { "string", ":", "delimiters", 0 };
         bind_builtin( "SPLIT_BY_CHARACTERS",
- builtin_split_by_characters, 0, 0 );
+ builtin_split_by_characters, 0, args );
     }
 
     duplicate_rule( "NoCare",
@@ -947,14 +947,10 @@
 
     string buf[ 1 ];
 
- const char * delimiters;
+ const char * delimiters = object_str( list_front( l2 ) );
     char * t;
 
- if ( list_empty( l1 ) || list_empty( l2 ) )
- return L0;
-
     string_copy( buf, object_str( list_front( l1 ) ) );
- delimiters = object_str( list_front( l2 ) );
 
     t = strtok( buf->value, delimiters ) ;
     while ( t )


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk