| 3684 | |
| 3685 | |
| 3686 | struct arg_list * argument_list_bind_variables( struct arg_list * formal, |
| 3687 | int32_t formal_count, module_t * module, int32_t * counter ) |
| 3688 | { |
| 3689 | if ( formal ) |
| 3690 | { |
| 3691 | struct arg_list * result = (struct arg_list *)BJAM_MALLOC( sizeof( |
| 3692 | struct arg_list ) * formal_count ); |
| 3693 | int32_t i; |
| 3694 | |
| 3695 | for ( i = 0; i < formal_count; ++i ) |
| 3696 | { |
| 3697 | int32_t j; |
| 3698 | struct argument * args = (struct argument *)BJAM_MALLOC( sizeof( |
| 3699 | struct argument ) * formal[ i ].size ); |
| 3700 | for ( j = 0; j < formal[ i ].size; ++j ) |
| 3701 | { |
| 3702 | args[ j ] = formal[ i ].args[ j ]; |
| 3703 | if ( args[ j ].type_name ) |
| 3704 | args[ j ].type_name = object_copy( args[ j ].type_name ); |
| 3705 | args[ j ].arg_name = object_copy( args[ j ].arg_name ); |
| 3706 | if ( args[ j ].flags != ARG_VARIADIC ) |
| 3707 | args[ j ].index = module_add_fixed_var( module, |
| 3708 | args[ j ].arg_name, counter ); |
| 3709 | } |
| 3710 | result[ i ].args = args; |
| 3711 | result[ i ].size = formal[ i ].size; |
| 3712 | } |
| 3713 | |
| 3714 | return result; |
| 3715 | } |
| 3716 | return 0; |
| 3717 | } |
| 3718 | |
| 3719 | |
| 3720 | void argument_list_free( struct arg_list * args, int32_t args_count ) |
no test coverage detected