Browse Source
bpo-44531: Add _PyType_AllocNoTrack() function (GH-26947)
bpo-44531: Add _PyType_AllocNoTrack() function (GH-26947)
Add an internal _PyType_AllocNoTrack() function to allocate an object without tracking it in the GC. Modify dict_new() to use _PyType_AllocNoTrack(): dict subclasses are now only tracked once all PyDictObject members are initialized. Calling _PyObject_GC_UNTRACK() is no longer needed for the dict type. Similar change in tuple_subtype_new() for tuple subclasses. Replace tuple_gc_track() with _PyObject_GC_TRACK().pull/26979/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 28 deletions
-
2Include/internal/pycore_object.h
-
30Objects/dictobject.c
-
35Objects/tupleobject.c
-
12Objects/typeobject.c
Write
Preview
Loading…
Cancel
Save
Reference in new issue