diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 47bc0bb..06d600e 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -877,6 +877,9 @@ subtype_dealloc(PyObject *self) assert(base); } + /* Extract the type again; tp_del may have changed it */ + type = Py_TYPE(self); + /* Call the base tp_dealloc() */ assert(basedealloc); basedealloc(self); @@ -958,6 +961,9 @@ subtype_dealloc(PyObject *self) } } + /* Extract the type again; tp_del may have changed it */ + type = Py_TYPE(self); + /* Call the base tp_dealloc(); first retrack self if * basedealloc knows about gc. */ |