mirror of
https://github.com/python/cpython.git
synced 2026-01-27 13:15:25 +00:00
The previous `Py_REFCNT(x) == 1` checks can have data races in the free threaded build. `_PyObject_IsUniquelyReferenced(x)` is a more conservative check that is safe in the free threaded build and is identical to `Py_REFCNT(x) == 1` in the default GIL-enabled build. (cherry picked from commit 32c264982ec67460642b907dabc3304019318291) Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Miscellaneous source files for the main Python shared library