MCPcopy Create free account
hub / github.com/boostorg/build / arg_list_compile_builtin

Function arg_list_compile_builtin

v2/engine/function.c:3344–3382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3342}
3343
3344static struct arg_list * arg_list_compile_builtin( char const * * args,
3345 int * num_arguments )
3346{
3347 if ( args )
3348 {
3349 struct argument_list_compiler c[ 1 ];
3350 struct arg_list * result;
3351 argument_list_compiler_init( c );
3352 while ( *args )
3353 {
3354 struct argument_compiler arg_comp[ 1 ];
3355 struct arg_list arg;
3356 argument_compiler_init( arg_comp );
3357 for ( ; *args; ++args )
3358 {
3359 OBJECT * token;
3360 if ( strcmp( *args, ":" ) == 0 )
3361 {
3362 ++args;
3363 break;
3364 }
3365 token = object_new( *args );
3366 argument_compiler_add( arg_comp, token, constant_builtin, -1 );
3367 object_free( token );
3368 }
3369 arg = arg_compile_impl( arg_comp, constant_builtin, -1 );
3370 dynamic_array_push( c->args, arg );
3371 argument_compiler_free( arg_comp );
3372 }
3373 *num_arguments = c->args->size;
3374 result = BJAM_MALLOC( c->args->size * sizeof( struct arg_list ) );
3375 memcpy( result, c->args->data, c->args->size * sizeof( struct arg_list )
3376 );
3377 argument_list_compiler_free( c );
3378 return result;
3379 }
3380 *num_arguments = 0;
3381 return 0;
3382}
3383
3384static void argument_list_print( struct arg_list * args, int num_args )
3385{

Callers 1

function_builtinFunction · 0.85

Calls 8

argument_compiler_initFunction · 0.85
object_newFunction · 0.85
argument_compiler_addFunction · 0.85
object_freeFunction · 0.85
arg_compile_implFunction · 0.85
argument_compiler_freeFunction · 0.85

Tested by

no test coverage detected