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 9ec47b3 commit 8e53a2eCopy full SHA for 8e53a2e
Modules/_testcapi/object.c
@@ -168,7 +168,9 @@ test_py_try_inc_ref(PyObject *self, PyObject *unused)
168
169
PyUnstable_EnableTryIncRef(op);
170
#ifdef Py_GIL_DISABLED
171
- // PyUnstable_EnableTryIncRef sets the shared flags to *at least*
+ // PyUnstable_EnableTryIncRef sets the shared flags to
172
+ // `_Py_REF_MAYBE_WEAKREF` if the flags are currently zero to ensure that
173
+ // the shared reference count is merged on deallocation.
174
assert((op->ob_ref_shared & _Py_REF_SHARED_FLAG_MASK) >= _Py_REF_MAYBE_WEAKREF);
175
#endif
176
0 commit comments