You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the limited C API 3.14 and newer, I propose to change Py_REFCNT() implementation to an opaque function call to hide implementation details. I made a similar change for Py_INCREF() and Py_DECREF() in Python 3.12.
The problem is that with Free Threading (PEP 703), the implementation of this functions becomes less trivial than just getting the object member PyObject.ob_refcnt:
_Py_atomic_load_uint32_relaxed() and _Py_atomic_load_ssize_relaxed() must now be called. But I would prefer to not "leak" such implementation detail into the limited C API.
In the limited C API 3.14 and newer, I propose to change Py_REFCNT() implementation to an opaque function call to hide implementation details. I made a similar change for Py_INCREF() and Py_DECREF() in Python 3.12.
The problem is that with Free Threading (PEP 703), the implementation of this functions becomes less trivial than just getting the object member
PyObject.ob_refcnt
:_Py_atomic_load_uint32_relaxed()
and_Py_atomic_load_ssize_relaxed()
must now be called. But I would prefer to not "leak" such implementation detail into the limited C API.cc @colesbury @Fidget-Spinner @encukou
Linked PRs
The text was updated successfully, but these errors were encountered: