diff options
author | Steve Frécinaux <code@istique.net> | 2011-03-07 01:58:36 +0100 |
---|---|---|
committer | Steve Frécinaux <code@istique.net> | 2011-03-07 19:00:36 +0100 |
commit | b113540b452638601945f63297e68b7564c3d4df (patch) | |
tree | 916878da166d7319af62ee4a15a5b0d37a968051 /gobject/pygobject-private.h | |
parent | 7bece91e83e3c72a7bd04d2096dcf9b31aa9d366 (diff) | |
download | pygobject-b113540b452638601945f63297e68b7564c3d4df.tar.gz |
Try not to sink objects returned by C functions.
When creating a wrapper around an object to call a python function, we
try to avoid calling pygobject_sink() when the object was not created by
pygobject or the static bindings because otherwise we can end up leaking
one reference for GInitiallyUnowned subclasses if the object was already
owned by someone else.
https://bugzilla.gnome.org/show_bug.cgi?id=644067
Diffstat (limited to 'gobject/pygobject-private.h')
-rw-r--r-- | gobject/pygobject-private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h index 99c1894c..6f3a25ef 100644 --- a/gobject/pygobject-private.h +++ b/gobject/pygobject-private.h @@ -156,6 +156,7 @@ void pygobject_register_class (PyObject *dict, void pygobject_register_wrapper (PyObject *self); PyObject * pygobject_new (GObject *obj); PyObject * pygobject_new_full (GObject *obj, gboolean sink, gpointer g_class); +PyObject * pygobject_new_sunk (GObject *obj); void pygobject_sink (GObject *obj); PyTypeObject *pygobject_lookup_class (GType gtype); void pygobject_watch_closure (PyObject *self, GClosure *closure); |