summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-25 01:08:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-25 01:08:45 (GMT)
commit193152c17479732f2fd9bd5d14ae4db119727bec (patch)
tree2166ce7a5f084ee4e95b88f7563f7e9cba3be49a /Objects
parent24fb1d0a7b6306f8c5e4f8591eff8c4fe21388d8 (diff)
downloadcpython-193152c17479732f2fd9bd5d14ae4db119727bec.zip
cpython-193152c17479732f2fd9bd5d14ae4db119727bec.tar.gz
cpython-193152c17479732f2fd9bd5d14ae4db119727bec.tar.bz2
Merged revisions 71860 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71860 | benjamin.peterson | 2009-04-24 19:41:22 -0500 (Fri, 24 Apr 2009) | 1 line fix a segfault when setting __class__ in __del__ #5283 ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
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.
*/