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

Function module_add_fixed_var

src/engine/modules.cpp:366–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364
365
366int module_add_fixed_var( struct module_t * m, OBJECT * name, int * counter )
367{
368 struct fixed_variable * v;
369 int found;
370
371 assert( !m->class_module );
372
373 if ( !m->variable_indices )
374 m->variable_indices = hashinit( sizeof( struct fixed_variable ), "variable index table" );
375
376 v = (struct fixed_variable *)hash_insert( m->variable_indices, name, &found );
377 if ( !found )
378 {
379 v->key = object_copy( name );
380 v->n = (*counter)++;
381 }
382
383 return v->n;
384}
385
386
387LIST * var_get_and_clear_raw( module_t * m, OBJECT * name );

Callers 3

make_class_moduleFunction · 0.85
function_bind_variablesFunction · 0.85

Calls 3

hashinitFunction · 0.85
hash_insertFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected