• Kevin Modzelewski's avatar
    Fix inheriting extension classes from builtins · 14a7c587
    Kevin Modzelewski authored
    Previously, we would just call these "conservative python" objects,
    and scan their memory conservatively.  The problem with this is that
    the builtin type might have defined a custom GC handler that needs to
    be called in addition to the conservative scanning (ie it stores GC
    pointers out-of-band that are not discoverable via other gc pointers).
    
    We had dealt with these kinds of issues before which is why I added
    the "conservative python kind", but I think the real solution here is
    to say that to the GC, these objects are just python objects, and
    then let the type machinery decide how to scan the objects, including
    how to handle the inheritance rules.  We were already putting
    "conservativeGCHandler" as the gc_handler on these conservative types,
    so let's use it.
    14a7c587
collector.cpp 26.2 KB