Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75824 - trunk/tools/build/v2/engine
From: steven_at_[hidden]
Date: 2011-12-06 09:59:21


Author: steven_watanabe
Date: 2011-12-06 09:59:18 EST (Tue, 06 Dec 2011)
New Revision: 75824
URL: http://svn.boost.org/trac/boost/changeset/75824

Log:
Don't pass an empty list to rules with no arguments. It breaks Python.
Text files modified:
   trunk/tools/build/v2/engine/function.c | 19 ++++++++++++-------
   1 files changed, 12 insertions(+), 7 deletions(-)

Modified: trunk/tools/build/v2/engine/function.c
==============================================================================
--- trunk/tools/build/v2/engine/function.c (original)
+++ trunk/tools/build/v2/engine/function.c 2011-12-06 09:59:18 EST (Tue, 06 Dec 2011)
@@ -382,6 +382,7 @@
     LIST * first = stack_pop( s );
     LIST * result = L0;
     OBJECT * rulename;
+ LIST * trailing;
 
     frame->file = file;
     frame->line = line;
@@ -420,14 +421,18 @@
         stack_pop( s );
     }
 
- if ( inner->args->count == 0 )
+ trailing = list_pop_front( first );
+ if ( trailing )
     {
- lol_add( inner->args, list_pop_front( first ) );
- }
- else
- {
- LIST * * l = &inner->args->list[0];
- *l = list_append( list_pop_front( first ), *l );
+ if ( inner->args->count == 0 )
+ {
+ lol_add( inner->args, trailing );
+ }
+ else
+ {
+ LIST * * l = &inner->args->list[0];
+ *l = list_append( trailing, *l );
+ }
     }
 
     result = evaluate_rule( rulename, inner );


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