• Kevin Modzelewski's avatar
    Large refactor for basic tp_alloc support · 0c20808b
    Kevin Modzelewski authored
    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.
    0c20808b
list.cpp 3.96 KB