Feature or enhancement
Py_SIZE & Py_SET_SIZE have issues -- I wish ob_size was much less public than it is -- but they can be used correctly and don't currently have good alternatives for some use cases.
Also, they're available as static inline functions when Py_LIMITED_API is defined, so many people treat them as part of Limited API already. The same goes for Py_IS_TYPE.
Let's turn them into real function symbols, and keep the static inline variants in the non-Limited API only.
Note that I don't propose exposing Py_SET_TYPE this way. The proper way to change an object's type is setting the __class__ Python attribute, which does proper checks and reference counting.
Linked PRs
Feature or enhancement
Py_SIZE&Py_SET_SIZEhave issues -- I wishob_sizewas much less public than it is -- but they can be used correctly and don't currently have good alternatives for some use cases.Also, they're available as
static inlinefunctions whenPy_LIMITED_APIis defined, so many people treat them as part of Limited API already. The same goes forPy_IS_TYPE.Let's turn them into real function symbols, and keep the
static inlinevariants in the non-Limited API only.Note that I don't propose exposing
Py_SET_TYPEthis way. The proper way to change an object's type is setting the__class__Python attribute, which does proper checks and reference counting.Linked PRs