After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680812 - Allow None for output parameter marshaling on overridden methods
Allow None for output parameter marshaling on overridden methods
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-30 07:01 UTC by Simon Feltman
Modified: 2012-07-30 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added Py_None check before attempting memcpy (1.17 KB, patch)
2012-07-30 07:05 UTC, Simon Feltman
none Details | Review

Description Simon Feltman 2012-07-30 07:01:06 UTC
Crash found trying to implement the Gtk TreeModel interface when overriding the do_get_iter method (http://developer.gnome.org/gtk/2.24/GtkTreeModel.html#gtk-tree-model-get-iter)

The ability to return (False, None) is needed. The marsheling code correctly translates None into NULL. However, it then tries to do a memcpy with this later on.

from gi.repository import GObject, Gtk
class TreeModel(GObject.GObject, Gtk.TreeModel):
    def do_get_iter(self, iter):
        return (False, None)
TreeModel().get_iter_first()
Comment 1 Simon Feltman 2012-07-30 07:05:30 UTC
Created attachment 219867 [details] [review]
Added Py_None check before attempting memcpy
Comment 2 Martin Pitt 2012-07-30 10:53:20 UTC
Thanks! Committed with a test case and tab fixes.