Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type #15323
The instance destructor for a type is responsible for preparing
If an instance belongs to a heap type, the type object of an instance
Previously, the default instance destructor searched the class
Then, if the instance type is a heap type, it would decrement the
This change avoids the premature destruction of the type object
Finally, an assertion on the Py_SIZE of a type was deleted. Heap
Yup, the sprint is going well!
I have added some commits directly to this branch, rather than tell you about the nitpicks I have and let you write the code.
@encukou I went through all of you changes and they all look good! I also rebased this to master to get rid of the merge conflicts so this change should be good to go!
Given that we are in the topic of heap allocated types, I've got posixmodule to use heap allocated types only in #15892 in case you'd like to take a look