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

Function argument_list_bind_variables

v2/engine/function.c:3412–3443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3410
3411
3412struct arg_list * argument_list_bind_variables( struct arg_list * formal,
3413 int formal_count, module_t * module, int * counter )
3414{
3415 if ( formal )
3416 {
3417 struct arg_list * result = (struct arg_list *)BJAM_MALLOC( sizeof(
3418 struct arg_list ) * formal_count );
3419 int i;
3420
3421 for ( i = 0; i < formal_count; ++i )
3422 {
3423 int j;
3424 struct argument * args = (struct argument *)BJAM_MALLOC( sizeof(
3425 struct argument ) * formal[ i ].size );
3426 for ( j = 0; j < formal[ i ].size; ++j )
3427 {
3428 args[ j ] = formal[ i ].args[ j ];
3429 if ( args[ j ].type_name )
3430 args[ j ].type_name = object_copy( args[ j ].type_name );
3431 args[ j ].arg_name = object_copy( args[ j ].arg_name );
3432 if ( args[ j ].flags != ARG_VARIADIC )
3433 args[ j ].index = module_add_fixed_var( module,
3434 args[ j ].arg_name, counter );
3435 }
3436 result[ i ].args = args;
3437 result[ i ].size = formal[ i ].size;
3438 }
3439
3440 return result;
3441 }
3442 return 0;
3443}
3444
3445
3446void argument_list_free( struct arg_list * args, int args_count )

Callers 1

function_bind_variablesFunction · 0.85

Calls 2

object_copyFunction · 0.85
module_add_fixed_varFunction · 0.85

Tested by

no test coverage detected