[Python-Dev] Source of truth for C-API

Victor Stinner vstinner at redhat.com
Tue Jan 22 18:17:48 EST 2019

I consider that frameobject.h is also part of the C API, even if it's
not included by Python.h. For example, PyFrame_GetLineNumber() is part
of the C API, it's just that you have to explicitly #include

I'm not aware of any tool to automatically list the content of the C API.

Counter example: PyFrame_New() is not documented. But I still consider
it to be part of the C API.

... Yeah, the definition of the "C API" is unclear to most peole :-)

See https://pythoncapi.readthedocs.io/ : "Design a new better C API for Python".


Le mar. 22 janv. 2019 à 23:49, Ivan Levkivskyi <levkivskyi at gmail.com> a écrit :
> Hi,
> I recently modified signatures of two functions PyNode_AddChild() and PyParser_AddToken().
> These two functions are not listed in C-API docs on docs.python.org, and are not included in Python.h. However, their names look like they may be part of C-API. So there appeared a question, what is the source of truth for C-API, is there an official list? Or is it just the content of Python.h?
> --
> Ivan
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/vstinner%40redhat.com

Night gathers, and now my watch begins. It shall not end until my death.

More information about the Python-Dev mailing list