| 2309 | */ |
| 2310 | |
| 2311 | PyObject * 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 | |
| 2339 | PyObject * bjam_backtrace( PyObject * self, PyObject * args ) |
nothing calls this directly
no test coverage detected