diff options
| author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-04-30 17:37:01 +0000 |
|---|---|---|
| committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2007-04-30 17:37:01 +0000 |
| commit | a0f7e83fb9a50a43668eb5c622bfa6edb06185f5 (patch) | |
| tree | 2ce9b002a31c658994ca26f19e99a285a039f2f2 /gobject | |
| parent | d96aaf253b925d4e84374f5c7e79398c21eff72f (diff) | |
| download | pygobject-a0f7e83fb9a50a43668eb5c622bfa6edb06185f5.tar.gz pygobject-a0f7e83fb9a50a43668eb5c622bfa6edb06185f5.tar.xz pygobject-a0f7e83fb9a50a43668eb5c622bfa6edb06185f5.zip | |
fix descriptor / toggle_ref interaction bug
svn path=/trunk/; revision=658
Diffstat (limited to 'gobject')
| -rw-r--r-- | gobject/pygobject.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index a17762d..27f82f6 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -2011,12 +2011,13 @@ pygobject_setattro(PyObject *self, PyObject *name, PyObject *value) { int res; PyGObject *gself = (PyGObject *) self; - if (gself->inst_dict == NULL) { + PyObject *inst_dict_before = gself->inst_dict; + /* call parent type's setattro */ + res = PyGObject_Type.tp_base->tp_setattro(self, name, value); + if (inst_dict_before == NULL && gself->inst_dict != NULL) { if (G_LIKELY(gself->obj)) pygobject_switch_to_toggle_ref(gself); } - /* call parent type's setattro */ - res = PyGObject_Type.tp_base->tp_setattro(self, name, value); return res; } |
