Hi guys, I'm new to swig and I have the following function which i cant fix:
int get_list(const char * string, struct entry ** results);
the entry struct is properly converted to a python class.
I googled but couldn't find any explanation i could use.
I want to make it return a python list of entry python objects, but don't
know how to convert the C entry to a python object in the argout code
I've managed to get thus far:
%typemap(argout) struct entry **
PyObject *o = PyList_New(0);
for(i=0; flux_entry[i] ; i++)
$result = o;
what should i replace SWIG_HOW_TO_CONVERT_TO_PYOBJECT with?
the array is allocated within the C function, so i'd also like to make sure
it's freed somewhere :)
Get latest updates about Open Source Projects, Conferences and News.