gh-117376: Partial implementation of deferred reference counting (#117696)

This marks objects as using deferred refrence counting using the
`ob_gc_bits` field in the free-threaded build and collects those objects
during GC.
This commit is contained in:
Sam Gross 2024-04-12 13:36:20 -04:00 committed by GitHub
parent c50cb6dd09
commit 4ad8f090cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 82 additions and 21 deletions

View file

@ -3581,6 +3581,8 @@ type_new_alloc(type_new_ctx *ctx)
et->ht_module = NULL;
et->_ht_tpname = NULL;
_PyObject_SetDeferredRefcount((PyObject *)et);
return type;
}