[PyObject members are not to be accessed directly](https://docs.python.org/3/c-api/structures.html#c.PyObject), but rather through macros, in this case `Py_REFCNT()`. In most, ie Global Interpreter Lock-enabled, CPython cases, `Py_REFCNT()` expands to accessing `ob_refcnt` anyway. However, in a free-threaded CPython, combined with disabling the limited API (since it requires the GIL for now), the direct member does not exist, causing the build to fail. The macro expands to the correct access method in the free-threaded configuration.
35 KiB
35 KiB