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

Function bjam_variable

src/engine/builtins.c:2311–2336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2309 */
2310
2311PyObject * bjam_variable( PyObject * self, PyObject * args )
2312{
2313 char * name;
2314 LIST * value;
2315 PyObject * result;
2316 int i;
2317 OBJECT * varname;
2318 LISTITER iter;
2319 LISTITER end;
2320
2321 if ( !PyArg_ParseTuple( args, "s", &name ) )
2322 return NULL;
2323
2324 varname = object_new( name );
2325 value = var_get( root_module(), varname );
2326 object_free( varname );
2327 iter = list_begin( value );
2328 end = list_end( value );
2329
2330 result = PyList_New( list_length( value ) );
2331 for ( i = 0; iter != end; iter = list_next( iter ), ++i )
2332 PyList_SetItem( result, i, PyString_FromString( object_str( list_item(
2333 iter ) ) ) );
2334
2335 return result;
2336}
2337
2338
2339PyObject * bjam_backtrace( PyObject * self, PyObject * args )

Callers

nothing calls this directly

Calls 8

object_newFunction · 0.85
var_getFunction · 0.85
root_moduleFunction · 0.85
object_freeFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
list_lengthFunction · 0.85
object_strFunction · 0.85

Tested by

no test coverage detected