I’m not sure this topic is a part of Improving collection of stable ABI macros and inline functions cc @nicholasjng @encukou
I think the inline
function will break the convention that the stable ABI have the same behavior(correct me plz if I’m wrong)
For example, the Py_INCREF
in this case:
- We don’t have any check before we actually add the reference count when the Python version <= 3.11
- We add extra check for the immortal object when the Python >=3.12
Because of the inline
, the behavior for the binary which is generated from the different Python version will have different behavior and I’m if we should call it undefined behavior.
I’m not sure disable the inline by default for the function API which is included in the stable ABI is a good idea. Feel free to correct me if I’m wrong