Le 17/03/2021 à 20:38, Victor Stinner a écrit :
There is a work-in-progress PR to document this organization: https://github.com/python/cpython/pull/24884
That's beside the point. Whether or not it's documented, it's still
cumbersome to navigate because you don't know upfront in which header
file you'll find the information you're looking for. So you end up
switching, for example, between Include/pystate.h
,
Include/cpython/pystate.h
and Include/internal/pycore_pystate.h
. It
feels like a waste of time.
I think it would be much more convenient with a single header file per topic, and clearly-separated sections in the header, e.g.:
/* ------------------------------------------------------
- Stable ABI / limited API */
...
/* ------------------------------------------------------
- Public API */
...
/* ------------------------------------------------------
- CPython-specific API */
...
/* ------------------------------------------------------
- CPython internals, only for CPython core
- Use at your own risk */
...
Regards
Antoine.