Message158328
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. |
|
Date |
User |
Action |
Args |
2012-04-15 14:12:52 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, pitrou, benjamin.peterson |
2012-04-15 14:12:52 | kristjan.jonsson | set | messageid: <1334499172.75.0.479925006706.issue8212@psf.upfronthosting.co.za> |
2012-04-15 14:12:52 | kristjan.jonsson | link | issue8212 messages |
2012-04-15 14:12:52 | kristjan.jonsson | create | |
|