GNOME Bugzilla – Bug 690514
pyg_value_from_pyobject: support GArray
Last modified: 2013-01-07 15:38:08 UTC
This commit adds support for marshalling a python list (or other sequence) returned from signal handlers to GArray, if necessary. This parallels the implementation written to marshal to (the now deprecated) GValueArray. This fixes a crash in rhythmbox as seen downstream here: https://bugzilla.redhat.com/show_bug.cgi?id=872851
Created attachment 231917 [details] [review] pyg_value_from_pyobject: support GArray
This causes some test failures, will post an updated patch.
Created attachment 231935 [details] [review] pyg_value_from_pyobject: support GArray This commit adds support for marshalling a python list (or other sequence) returned from signal handlers to GArray, if necessary. This parallels the implementation written to marshal to (the now deprecated) GValueArray. This fixes a crash in rhythmbox as seen downstream here: https://bugzilla.redhat.com/show_bug.cgi?id=872851
Thanks for the patch! This looks good, but needs a regression test. Unless someone beats me to it, I'll write one when I'm back from vacation.
I added a signal that returns a GArray to gobject-introspection's tests: http://git.gnome.org/browse/gobject-introspection/commit/?id=eff011ce1d274e9add73fbf71fb8617ba37fb9f8 With this we can write a test case, which I added to your commit: http://git.gnome.org/browse/pygobject/commit/?id=23d1f14f553069740465c82eaa937b877c41e0cb It looks a bit ugly as this actually returns a GLib.Array object to Python instead of a Python array; that still smells like a bug, but at least we now assert that it returns the expected type to C. Thanks!
Thanks for the work on this.