| 440 | #ifdef HAVE_PYTHON |
| 441 | |
| 442 | PyObject * list_to_python( LIST * l ) |
| 443 | { |
| 444 | PyObject * result = PyList_New( 0 ); |
| 445 | LISTITER iter = list_begin( l ); |
| 446 | LISTITER const end = list_end( l ); |
| 447 | for ( ; iter != end; iter = list_next( iter ) ) |
| 448 | { |
| 449 | PyObject * s = PyString_FromString( object_str( list_item( iter ) ) ); |
| 450 | PyList_Append( result, s ); |
| 451 | Py_DECREF( s ); |
| 452 | } |
| 453 | |
| 454 | return result; |
| 455 | } |
| 456 | |
| 457 | LIST * list_from_python( PyObject * l ) |
| 458 | { |
no test coverage detected