On 22. 02. 22 13:41, Victor Stinner wrote:
Hi,

Since Erlend and me posted PEP 670 on python-dev last October, we took
all feedback (python-dev and Steering Council) in account to clarify
the intent of the PEP and to reduce its scope (remove *any* risk of
backward compatibility).

PEP 670: https://python.github.io/peps/pep-0670/


I did realize there's one more issue when converting macros or static inline functions to regular functions. Regular functions' bodies aren't guarded by limited API #ifdefs, so if they are part of the limited API it's easy to forget to think about it when changing them. If a macro in the limited API is converted to a regular function, then a test should be added to ensure the old implementation of the macro (i.e. what's compiled into stable ABI extensions) still works.


In the PEP, the "Performance and inlining" section seems unnecessary. It talks about attributes that aren't used in the implementation. Or are they? How does the section relate to the rest of the PEP? The "Benchmark comparing macros and static inline functions" section at the end should be enough to explain the impact.


[...]> Following the SC decision, we already modified PEP 7 to add:

"static inline functions should be preferred over macros in new code."
https://www.python.org/dev/peps/pep-0007/#c-dialect

Nice! Thanks!
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/MAWV2EGOEKO22IRIUZD66QD2ZAOA55OW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to