Author serhiy.storchaka
Recipients eric.snow, jdemeyer, matrixise, pitrou, scoder, serhiy.storchaka
Date 2019-03-28.06:55:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553756154.02.0.220269851241.issue35983@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-03-28 06:55:54serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, scoder, eric.snow, jdemeyer, matrixise
2019-03-28 06:55:54serhiy.storchakasetmessageid: <1553756154.02.0.220269851241.issue35983@roundup.psfhosted.org>
2019-03-28 06:55:54serhiy.storchakalinkissue35983 messages
2019-03-28 06:55:53serhiy.storchakacreate