Let’s say I get a glib gpointer to a glib gslist and would like to iterate over the latter, how would I do it?
I don’t even know how to get to the gslist with the gpointer for starters!
Update: I found a workaround – the python bindings in this instance wasn’t complete so I had to find another solution.
How is
glibexposed to Python in your application? Via SWIG, ctypes or something else?You should basically use
glib‘s own functions to iterate over a list. Something likeg_slist_foreach. Just pass it the pointer and its other parameters to do the job. Again, this heavily depends on how you accessglibin your Python application.