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

Function bjam_variable

src/engine/builtins.cpp:2245–2270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2243 */
2244
2245PyObject * bjam_variable( PyObject * self, PyObject * args )
2246{
2247 char * name;
2248 LIST * value;
2249 PyObject * result;
2250 int i;
2251 OBJECT * varname;
2252 LISTITER iter;
2253 LISTITER end;
2254
2255 if ( !PyArg_ParseTuple( args, "s", &name ) )
2256 return NULL;
2257
2258 varname = object_new( name );
2259 value = var_get( root_module(), varname );
2260 object_free( varname );
2261 iter = list_begin( value );
2262 end = list_end( value );
2263
2264 result = PyList_New( list_length( value ) );
2265 for ( i = 0; iter != end; iter = list_next( iter ), ++i )
2266 PyList_SetItem( result, i, PyString_FromString( object_str( list_item(
2267 iter ) ) ) );
2268
2269 return result;
2270}
2271
2272
2273PyObject * 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