[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

Kristján Valur Jónsson report at bugs.python.org
Tue Apr 17 00:56:58 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

Here is a patch with the suggested change.
I put _PyObject_ResurrectFromDealloc into typeobject.c since it seems more at home there than in object.c, but I'm not sure.
Also note that other types, that were calling _PyIOBase_finalize() from their tp_dealloc slots (bufferedio, fileio) will now also get the correct behavior with the incref'd ob_type slot, if the object is resurrected.

----------
Added file: http://bugs.python.org/file25247/resurrect.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8212>
_______________________________________


More information about the Python-bugs-list mailing list