| 2243 | */ |
| 2244 | |
| 2245 | PyObject * 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 | |
| 2273 | PyObject * bjam_backtrace( PyObject * self, PyObject * args ) |
nothing calls this directly
no test coverage detected