GH-127705: Use _PyStackRefs in the default build. (GH-127875)

This commit is contained in:
Mark Shannon 2025-03-10 14:06:56 +00:00 committed by GitHub
parent 7cc99a54b7
commit 2bef8ea8ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 688 additions and 254 deletions

View file

@ -2540,6 +2540,9 @@ _Py_SetImmortalUntracked(PyObject *op)
op->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
op->ob_ref_shared = 0;
_Py_atomic_or_uint8(&op->ob_gc_bits, _PyGC_BITS_DEFERRED);
#elif SIZEOF_VOID_P > 4
op->ob_flags = _Py_IMMORTAL_FLAGS;
op->ob_refcnt = _Py_IMMORTAL_INITIAL_REFCNT;
#else
op->ob_refcnt = _Py_IMMORTAL_INITIAL_REFCNT;
#endif