Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 53373:642910a01d7f 2.6
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
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 25 Apr 2009 00:44:44 +0000 |
| parents | f3b26a729e82 |
| children | 0dbeccd7e0e6 |
line wrap: on
line diff
--- a/Objects/typeobject.c Fri Apr 24 20:18:22 2009 +0000 +++ b/Objects/typeobject.c Sat Apr 25 00:44:44 2009 +0000 @@ -928,6 +928,9 @@ 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 @@ } } + /* 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. */
