[Python-Dev] Re: Version 2 of PEP 670 – Convert macros to functions in the Python C API

2022-02-24 Thread Petr Viktorin
On 23. 02. 22 20:15, Victor Stinner wrote: On Wed, Feb 23, 2022 at 7:11 PM Petr Viktorin wrote: 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

[Python-Dev] Re: Version 2 of PEP 670 – Convert macros to functions in the Python C API

2022-02-23 Thread Victor Stinner
On Wed, Feb 23, 2022 at 7:11 PM Petr Viktorin wrote: > 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

[Python-Dev] Re: Version 2 of PEP 670 – Convert macros to functions in the Python C API

2022-02-23 Thread Victor Stinner
On Wed, Feb 23, 2022 at 7:11 PM Petr Viktorin wrote: > 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

[Python-Dev] Re: Version 2 of PEP 670 – Convert macros to functions in the Python C API

2022-02-23 Thread Petr Viktorin
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: