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

Function argument_list_bind_variables

src/engine/function.c:3511–3542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3509
3510
3511struct arg_list * argument_list_bind_variables( struct arg_list * formal,
3512 int formal_count, module_t * module, int * counter )
3513{
3514 if ( formal )
3515 {
3516 struct arg_list * result = (struct arg_list *)BJAM_MALLOC( sizeof(
3517 struct arg_list ) * formal_count );
3518 int i;
3519
3520 for ( i = 0; i < formal_count; ++i )
3521 {
3522 int j;
3523 struct argument * args = (struct argument *)BJAM_MALLOC( sizeof(
3524 struct argument ) * formal[ i ].size );
3525 for ( j = 0; j < formal[ i ].size; ++j )
3526 {
3527 args[ j ] = formal[ i ].args[ j ];
3528 if ( args[ j ].type_name )
3529 args[ j ].type_name = object_copy( args[ j ].type_name );
3530 args[ j ].arg_name = object_copy( args[ j ].arg_name );
3531 if ( args[ j ].flags != ARG_VARIADIC )
3532 args[ j ].index = module_add_fixed_var( module,
3533 args[ j ].arg_name, counter );
3534 }
3535 result[ i ].args = args;
3536 result[ i ].size = formal[ i ].size;
3537 }
3538
3539 return result;
3540 }
3541 return 0;
3542}
3543
3544
3545void 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