diff options
Diffstat (limited to 'Objects/typeslots.py')
-rwxr-xr-x | Objects/typeslots.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/typeslots.py b/Objects/typeslots.py index 8ab05f9..c7f8a33 100755 --- a/Objects/typeslots.py +++ b/Objects/typeslots.py @@ -13,7 +13,11 @@ def generate_typeslots(out=sys.stdout): continue member = m.group(1) - if member.startswith("tp_"): + if member == "tp_token": + # The heap type structure (ht_*) is an implementation detail; + # the public slot for it has a familiar `tp_` prefix + member = '{-1, offsetof(PyHeapTypeObject, ht_token)}' + elif member.startswith("tp_"): member = f'{{-1, offsetof(PyTypeObject, {member})}}' elif member.startswith("am_"): member = (f'{{offsetof(PyAsyncMethods, {member}),'+ |