mirror of
https://github.com/python/cpython.git
synced 2026-01-27 21:25:12 +00:00
Previously, basic initialization of PyInterprterState happened in PyInterpreterState_New() (along with allocation and adding the new interpreter to the runtime state). This prevented us from initializing interpreter states that were allocated separately (e.g. statically or in a free list). We've addressed that here by factoring out a separate function just for initialization. We've done the same for PyThreadState. _PyRuntimeState was sorted out when we added it since _PyRuntime is statically allocated. However, here we update the existing init code to line up with the functions for PyInterpreterState and PyThreadState. https://bugs.python.org/issue46008
The Python C API ================ The C API is divided into three sections: 1. ``Include/``: Limited API 2. ``Include/cpython/``: CPython implementation details 3. ``Include/internal/``: The internal API Information on changing the C API is available `in the developer guide`_ .. _in the developer guide: https://devguide.python.org/c-api/