[Python-Dev] Not all public names in C API have the "Py" prefix

Serhiy Storchaka storchaka at gmail.com
Mon Mar 27 11:27:30 EDT 2017


On 27.03.17 13:43, Victor Stinner wrote:
> 2017-03-27 12:22 GMT+02:00 Serhiy Storchaka <storchaka at gmail.com>:
>> Should we to do something with this? Maybe add Py-prefixed aliases and
>> temporary keep old names for compatibility (but allow to hide them if define
>> a special macro)?
>
> Is is possible to keep backward compatibility if an older version of
> the stable ABI is explicitly requested?
>
> Something like:
>
> #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x03070000
> #define getter _Py_getter
> ....
> #endif

I think it is better to use typedef than #define.




More information about the Python-Dev mailing list