| 2209 | */ |
| 2210 | |
| 2211 | PyObject * 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 | |
| 2239 | PyObject * bjam_backtrace( PyObject * self, PyObject * args ) |
nothing calls this directly
no test coverage detected