We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b87fac commit 50e0fe3Copy full SHA for 50e0fe3
Objects/object.c
@@ -2677,6 +2677,9 @@ _Py_SetImmortalUntracked(PyObject *op)
2677
}
2678
#endif
2679
#ifdef Py_GIL_DISABLED
2680
+ // We set these bits for all immortals, even static one, to simplify
2681
+ // further checks on hot path. In fact, if _Py_IsImmortal(op) == 1,
2682
+ // then _PyObject_HasDeferredRefcount(op) == 1.
2683
_Py_atomic_or_uint8(&op->ob_gc_bits, _PyGC_BITS_DEFERRED);
2684
2685
// Check if already immortal to avoid degrading from static immortal to plain immortal
0 commit comments