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

@ -4,10 +4,11 @@
extern "C" {
#endif
#include "pycore_structs.h"
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
#include "pycore_llist.h"
#include "pycore_ast_state.h" // struct ast_state
#include "pycore_llist.h"
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
#include "pycore_structs.h"
#include "pycore_typedefs.h" // _PyRuntimeState
/* This file contains the struct definitions for interpreter state
@ -802,7 +803,7 @@ struct _is {
/* Reference to the _PyRuntime global variable. This field exists
to not have to pass runtime in addition to tstate to a function.
Get runtime from tstate: tstate->interp->runtime. */
struct pyruntimestate *runtime;
_PyRuntimeState *runtime;
/* Set by Py_EndInterpreter().