Message339017
In your example you can add
PyTypeObject *tp = Py_TYPE(self);
Py_TYPE(self) = &PyList_Type;
if (PyType_GetFlags(tp) & Py_TPFLAGS_HEAPTYPE) {
Py_DECREF(tp);
}
before calling PyList_Type.tp_dealloc().
It is possible to add such code directly in PyList_Type.tp_dealloc and other deallocators that use the trashcan mechanism. |
|
| Date |
User |
Action |
Args |
| 2019-03-28 06:55:54 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, scoder, eric.snow, jdemeyer, matrixise |
| 2019-03-28 06:55:54 | serhiy.storchaka | set | messageid: <1553756154.02.0.220269851241.issue35983@roundup.psfhosted.org> |
| 2019-03-28 06:55:54 | serhiy.storchaka | link | issue35983 messages |
| 2019-03-28 06:55:53 | serhiy.storchaka | create | |
|