From e0fc94bfbdae09096f73b4378686a3ec2e8e392a Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sun, 17 Jun 2007 16:26:34 +0000 Subject: Bug 447271 – gobject has a weird bug on mac. Involves python, property and subclassing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=677 --- gobject/pygobject.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gobject/pygobject.c') diff --git a/gobject/pygobject.c b/gobject/pygobject.c index 27f82f6..f889bc5 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -648,6 +648,10 @@ static inline void pygobject_switch_to_toggle_ref(PyGObject *self) { g_assert(self->obj->ref_count >= 1); + + if (self->private.flags & PYGOBJECT_USING_TOGGLE_REF) + return; /* already using toggle ref */ + self->private.flags |= PYGOBJECT_USING_TOGGLE_REF; /* Note that add_toggle_ref will never immediately call back into pyg_toggle_notify */ Py_INCREF((PyObject *) self); -- cgit