This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nascheme
Recipients nascheme
Date 2021-08-10.21:07:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628629679.48.0.759166908477.issue44881@roundup.psfhosted.org>
In-reply-to
Content
The fix for bpo-33930 includes a somewhat mysterious comment:

    // The Py_TRASHCAN mechanism requires that we be able to
    // call PyObject_GC_UnTrack twice on an object.

I wonder if we can just integrate the untrack into the body of the trashcan code.  Then, the explicit call to untrack in the dealloc function body can be removed.  That removes the risk of incorrectly using the macro version.

I suspect the reason this was not done originally is because the original trashcan mechanism did not use the GC header pointers to store objects.  Now, any object that uses the trashcan *must* be a GC object.
History
Date User Action Args
2021-08-10 21:07:59naschemesetrecipients: + nascheme
2021-08-10 21:07:59naschemesetmessageid: <1628629679.48.0.759166908477.issue44881@roundup.psfhosted.org>
2021-08-10 21:07:59naschemelinkissue44881 messages
2021-08-10 21:07:59naschemecreate