gh-103743: Add PyUnstable_Object_GC_NewWithExtraData by jbradaric · Pull Request #103744 · python/cpython
jbradaric
marked this pull request as ready for review
jbradaric
changed the title
[WIP] gh-103743: Add PyUnstable_Object_GC_NewWithExtraData
gh-103743: Add PyUnstable_Object_GC_NewWithExtraData
ambv and others added 4 commits
This is a further workaround: this time for the fact that we can't rely on tp_alloc, which zeroes the memory (including memory for subclasses, like slots in the test) for normal classes. For the test type, this means the instances aren't initialized twice (once in PyUnstable_Object_GC_NewWithExtraData, once again with PyObject_Init after zeroing). Initializing twice throws off the global refcount total in debug builds.
Fix indentation and reword some parts to sound more natural. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
jbradaric
deleted the
jbradaric/obj-new-with-extra-data
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters