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

Function var_set

src/engine/variable.cpp:293–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 */
292
293void var_set( struct module_t * module, OBJECT * symbol, LIST * value, int flag
294 )
295{
296 LIST * * v = var_enter( module, symbol );
297
298 if ( DEBUG_VARSET )
299 var_dump( symbol, value, "set" );
300
301 switch ( flag )
302 {
303 case VAR_SET: /* Replace value */
304 list_free( *v );
305 *v = value;
306 break;
307
308 case VAR_APPEND: /* Append value */
309 *v = list_append( *v, value );
310 break;
311
312 case VAR_DEFAULT: /* Set only if unset */
313 if ( list_empty( *v ) )
314 *v = value;
315 else
316 list_free( value );
317 break;
318 }
319}
320
321
322/*

Callers 13

make_class_moduleFunction · 0.85
var_definesFunction · 0.85
variableClass · 0.85
mainFunction · 0.85
function_set_variableFunction · 0.85
function_append_variableFunction · 0.85
argument_list_popFunction · 0.85
property_set_createFunction · 0.85

Calls 4

var_enterFunction · 0.85
var_dumpFunction · 0.85
list_freeFunction · 0.85
list_appendFunction · 0.85

Tested by

no test coverage detected