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

Function list_to_python

src/engine/lists.cpp:442–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440#ifdef HAVE_PYTHON
441
442PyObject * 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
457LIST * list_from_python( PyObject * l )
458{

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