[Python-Dev] Re: Clarification regarding Stable ABI and _Py_*

2021年12月06日 12:15:46 -0800

On 06. 12. 21 20:29, Guido van Rossum wrote:
Hi Petr,
In PEP 384 it is written that no functions starting with an underscore are part of the stable ABI: PEP 384 -- Defining a Stable ABI | Python.org <https://www.python.org/dev/peps/pep-0384/#excluded-functions>
 > All functions starting with _Py are not available to applications
OTOH there's a data file in the repo, Misc/stabe_abi.txt, which lists many functions starting with _Py_, for example _PyObject_GC_Malloc. Then again, that function is not listed in Doc/data/stable_abi.dat. (I didn't check other functions, but maybe there are others.) So is Misc/stable_abi.txt just out of date? Or how can the discrepancy be explained?
These are not part of the limited API, so extension authors can't use them in the C source. But they typically are (or have been) called by macros from the limited API. So, they are part of the stable ABI; they need to be exported. Misc/stable_abi.txt says "abi_only" for all of these. They don't show up in the user-facing docs.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/WB3W2QY4PLM5XGLQMEEC4HE3HSQ4M3KO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to