| 396 | |
| 397 | |
| 398 | void module_set_fixed_variables( struct module_t * m, int n_variables ) |
| 399 | { |
| 400 | /* Reallocate */ |
| 401 | struct hash * variable_indices; |
| 402 | LIST * * fixed_variables = (LIST * *)BJAM_MALLOC( n_variables * sizeof( LIST * ) ); |
| 403 | if ( m->fixed_variables ) |
| 404 | { |
| 405 | memcpy( fixed_variables, m->fixed_variables, m->num_fixed_variables * sizeof( LIST * ) ); |
| 406 | BJAM_FREE( m->fixed_variables ); |
| 407 | } |
| 408 | m->fixed_variables = fixed_variables; |
| 409 | variable_indices = m->class_module |
| 410 | ? m->class_module->variable_indices |
| 411 | : m->variable_indices; |
| 412 | if ( variable_indices ) |
| 413 | hashenumerate( variable_indices, &load_fixed_variable, m ); |
| 414 | m->num_fixed_variables = n_variables; |
| 415 | } |
| 416 | |
| 417 | |
| 418 | int module_get_fixed_var( struct module_t * m_, OBJECT * name ) |
no test coverage detected