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

Function var_enter

v2/engine/variable.c:293–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 */
292
293static LIST * * var_enter( struct module_t * module, OBJECT * symbol )
294{
295 int found;
296 VARIABLE * v;
297 int n;
298
299 if ( ( n = module_get_fixed_var( module, symbol ) ) != -1 )
300 return &module->fixed_variables[ n ];
301
302 if ( !module->variables )
303 module->variables = hashinit( sizeof( VARIABLE ), "variables" );
304
305 v = (VARIABLE *)hash_insert( module->variables, symbol, &found );
306 if ( !found )
307 {
308 v->symbol = object_copy( symbol );
309 v->value = L0;
310 }
311
312 return &v->value;
313}
314
315
316/*

Callers 2

var_setFunction · 0.85
var_swapFunction · 0.85

Calls 4

module_get_fixed_varFunction · 0.85
hashinitFunction · 0.85
hash_insertFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected