bpo-39573: Convert Py_TYPE() and Py_SIZE() back to macros by vstinner · Pull Request #23366 · python/cpython (original) (raw)

I didn't see any bug report about Py_REFCNT() becoming a static inline function, so I prefer to only change Py_TYPE() and Py_SIZE().

Setting manually the reference counter of an object is a very rare use case. I'm only aware of Cython doing that, and I already updated Cython to use Py_SET_REFCNT() internally.