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

Function var_set

v2/engine/variable.c:245–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243 */
244
245void var_set( struct module_t * module, OBJECT * symbol, LIST * value, int flag
246 )
247{
248 LIST * * v = var_enter( module, symbol );
249
250 if ( DEBUG_VARSET )
251 var_dump( symbol, value, "set" );
252
253 switch ( flag )
254 {
255 case VAR_SET: /* Replace value */
256 list_free( *v );
257 *v = value;
258 break;
259
260 case VAR_APPEND: /* Append value */
261 *v = list_append( *v, value );
262 break;
263
264 case VAR_DEFAULT: /* Set only if unset */
265 if ( list_empty( *v ) )
266 *v = value;
267 else
268 list_free( value );
269 break;
270 }
271}
272
273
274/*

Callers 12

var_definesFunction · 0.85
make_class_moduleFunction · 0.85
function_set_variableFunction · 0.85
function_append_variableFunction · 0.85
argument_list_popFunction · 0.85
mainFunction · 0.85
add_pairFunction · 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