gh-131238: Remove pycore_runtime.h from pycore_pystate.h (#131356)

* Remove includes from pycore_pystate.h:

  * pycore_runtime_structs.h
  * pycore_runtime.h
  * pycore_tstate.h
  * pycore_interp.h

* Reorganize internal headers. Move _gc_thread_state from
  pycore_interp_structs.h to pycore_tstate.h.
* Add 3 new header files to PCbuild/pythoncore.vcxproj.
This commit is contained in:
Victor Stinner 2025-03-19 17:33:24 +01:00 committed by GitHub
parent 0a54bd6dd7
commit 4b54031323
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 46 additions and 28 deletions

View file

@ -5,9 +5,10 @@ extern "C" {
#endif
#include "pycore_ast_state.h" // struct ast_state
#include "pycore_llist.h"
#include "pycore_llist.h" // struct llist_node
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
#include "pycore_structs.h"
#include "pycore_structs.h" // PyHamtObject
#include "pycore_tstate.h" // _PyThreadStateImpl
#include "pycore_typedefs.h" // _PyRuntimeState
@ -246,13 +247,6 @@ struct _gc_runtime_state {
#endif
};
#ifdef Py_GIL_DISABLED
struct _gc_thread_state {
/* Thread-local allocation count. */
Py_ssize_t alloc_count;
};
#endif
#include "pycore_gil.h"
/****** Thread state **************/