Message372049
To fix bpo-40170, I would like to modify Py_TRASHCAN_BEGIN() macro to use PyType_GetSlot() to get the deallocator function, rather than accessing directly the PyTypeObject.tp_dealloc member. The problem is that currently PyType_GetSlot() only works on heap allocated types.
Would it be possible to add support for statically allocated types to PyType_GetSlot()?
Py_TRASHCAN_BEGIN() is currently defined as:
#define Py_TRASHCAN_BEGIN(op, dealloc) \
Py_TRASHCAN_BEGIN_CONDITION(op, \
Py_TYPE(op)->tp_dealloc == (destructor)(dealloc)) |
|
| Date |
User |
Action |
Args |
| 2020-06-22 08:38:14 | vstinner | set | recipients:
+ vstinner |
| 2020-06-22 08:38:14 | vstinner | set | messageid: <[email protected]> |
| 2020-06-22 08:38:14 | vstinner | link | issue41073 messages |
| 2020-06-22 08:38:14 | vstinner | create | |
|