On Fri, 2015-02-20 at 10:19 +0000, Demeyer Jonathan wrote:
Hello, (please, tell me if I post on the wrong mailing-list) I'm trying to read values written by a C library (with GObjects) in python with g-i. I try to mix C and Python in a GStreamer application.
I would suggest the python-hackers list, but it looks like you’ve already cross-posted there.
I have followed the pattern here (i.e. using GBoxedType) : http://blog-vpodzime.rhcloud.com/?p=33 I made it works but I'm stuck when the structure defined in C has an array of another structure. In the real program (too complicated to show it to you), a get a : ** (python3:5741): CRITICAL **: Stack overflow protection. Can't copy array element into GIArgument.
*snip* I can’t see anything obviously wrong with this, so I suggest you file a bug against pygobject. From my brief playing around, it seems like pygobject doesn’t handle arrays of structs (as opposed to arrays of pointers to structs) — it’s interpreting each TutAnotherStruct instance as a TutAnotherStruct* and hence the 0-filled ones get interpreted as None. https://bugzilla.gnome.org/enter_bug.cgi?product=pygobject Philip
Attachment:
signature.asc
Description: This is a digitally signed message part