Kristján Valur Jónsson <krist...@ccpgames.com> added the comment: Another, less hacky but more intrusive, way would be to change the signature of tp_dealloc in a backwards compatible way: typedef void (*destructor)(PyObject *, int *destroyed);
The destructor can then set the flag pointed to by 'destroyed' to 1 or 0, depending on whether actual destruction took place. The caller will set the flag to '1' by default. We could then change all internal destructors to conform, and know that external destructors will continue to work in the old way. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8212> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com