Large refactor for basic tp_alloc support
Use operator new() to get access to tp_alloc in a C++-ish way. Instead of passing the object's class to the constructor, pass it to new(). We need to do this since the class gets to pick how the object gets allocated, including how large it will end up being. Unfortunately it looks like defining an operator new on a subclass hides the operator new from a superclass, even if they have different signatures. Macros to the rescue.
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment