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

Function list_to_python

v2/engine/lists.c:444–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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