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

Function bjam_variable

v2/engine/builtins.c:2211–2236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2209 */
2210
2211PyObject * bjam_variable( PyObject * self, PyObject * args )
2212{
2213 char * name;
2214 LIST * value;
2215 PyObject * result;
2216 int i;
2217 OBJECT * varname;
2218 LISTITER iter;
2219 LISTITER end;
2220
2221 if ( !PyArg_ParseTuple( args, "s", &name ) )
2222 return NULL;
2223
2224 varname = object_new( name );
2225 value = var_get( root_module(), varname );
2226 object_free( varname );
2227 iter = list_begin( value );
2228 end = list_end( value );
2229
2230 result = PyList_New( list_length( value ) );
2231 for ( i = 0; iter != end; iter = list_next( iter ), ++i )
2232 PyList_SetItem( result, i, PyString_FromString( object_str( list_item(
2233 iter ) ) ) );
2234
2235 return result;
2236}
2237
2238
2239PyObject * 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