GNOME Bugzilla – Bug 618572
Convert None to NULL for interfaces which take object pointers
Last modified: 2010-05-14 15:24:19 UTC
I wrote a function in Gtk that could take a GtkRadioAction * or a NULL. Sending None would not get converted to a NULL and would instead send a garbage pointer 0x3. This patch checks for None in the code path and sets the arg to NULL.
Created attachment 161007 [details] [review] [PATCH] if None is passed to an interface which takes an object, convert it to NULL gi/pygi-argument.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
How should we test this without GTK? Should I add a test object to gobject-introspection?
Review of attachment 161007 [details] [review]: Looks good. Misses a test although.
There's a test in the same patch at https://bugzilla.gnome.org/show_bug.cgi?id=617880 . I'm sorry but I haven't gotten the chance to think a better commit message and push it.
*** This bug has been marked as a duplicate of bug 617880 ***