2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00

Don't pass an empty list to rules with no arguments. It breaks Python.

[SVN r75824]
This commit is contained in:
Steven Watanabe
2011-12-06 14:59:18 +00:00
parent c912c06861
commit fccedf819b

View File

@@ -382,6 +382,7 @@ static LIST * function_call_rule( JAM_FUNCTION * function, FRAME * frame, STACK
LIST * first = stack_pop( s );
LIST * result = L0;
OBJECT * rulename;
LIST * trailing;
frame->file = file;
frame->line = line;
@@ -420,14 +421,18 @@ static LIST * function_call_rule( JAM_FUNCTION * function, FRAME * frame, STACK
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 );