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

Function list_to_python

src/engine/lists.c:445–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

argument_list_to_pythonFunction · 0.85
call_python_functionFunction · 0.85

Calls 3

list_beginFunction · 0.85
list_endFunction · 0.85
object_strFunction · 0.85

Tested by

no test coverage detected