gh-130931: Add pycore_typedefs.h internal header (#131396)

Declare _PyInterpreterFrame and _PyRuntimeState types before
declaring their structure members. Break reference cycles between
header files.
This commit is contained in:
Victor Stinner 2025-03-19 15:23:32 +01:00 committed by GitHub
parent a0478c9f0c
commit b8367e7cf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 57 additions and 28 deletions

View file

@ -143,7 +143,7 @@ struct _Py_static_objects {
That data is exported by the internal API as a global variable
(_PyRuntime, defined near the top of pylifecycle.c).
*/
typedef struct pyruntimestate {
struct pyruntimestate {
/* This field must be first to facilitate locating it by out of process
* debuggers. Out of process debuggers will use the offsets contained in this
* field to be able to locate other fields in several interpreter structures
@ -307,7 +307,7 @@ typedef struct pyruntimestate {
PyInterpreterState _main_interpreter;
// _main_interpreter should be the last field of _PyRuntimeState.
// See https://github.com/python/cpython/issues/127117.
} _PyRuntimeState;
};