New submission from STINNER Victor <[email protected]>:
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))
----------
components: C API
messages: 372049
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] PyType_GetSlot() should accept static types
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41073>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com