GH-124715: Move trashcan mechanism into Py_Dealloc (GH-132280)

This commit is contained in:
Mark Shannon 2025-04-30 11:37:53 +01:00 committed by GitHub
parent 0f23e84cda
commit 44e4c479fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 88 additions and 196 deletions

View file

@ -566,11 +566,9 @@ filter_dealloc(PyObject *self)
{
filterobject *lz = _filterobject_CAST(self);
PyObject_GC_UnTrack(lz);
Py_TRASHCAN_BEGIN(lz, filter_dealloc)
Py_XDECREF(lz->func);
Py_XDECREF(lz->it);
Py_TYPE(lz)->tp_free(lz);
Py_TRASHCAN_END
}
static int