summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-25 00:44:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-25 00:44:44 (GMT)
commitaf75a5f247df360f232f101067eafb7a93b01db4 (patch)
treed5867fe95064669910397e1278648d23fee9daab /Objects
parent50101def6ee183e6d57d6cdbb9c1c9ec463cef59 (diff)
downloadcpython-af75a5f247df360f232f101067eafb7a93b01db4.zip
cpython-af75a5f247df360f232f101067eafb7a93b01db4.tar.gz
cpython-af75a5f247df360f232f101067eafb7a93b01db4.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 ddfc730..7e48172 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -928,6 +928,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);
@@ -1009,6 +1012,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.
*/