]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131238: Use pycore_interp_structs.h header (#131481)
authorVictor Stinner <vstinner@python.org>
Wed, 19 Mar 2025 23:13:25 +0000 (00:13 +0100)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 23:13:25 +0000 (23:13 +0000)
Replace pycore_runtime_structs.h include with pycore_interp_structs.h
include in internal headers.

Include/internal/pycore_codecs.h
Include/internal/pycore_fileutils.h
Include/internal/pycore_gc.h
Include/internal/pycore_import.h
Include/internal/pycore_interp.h
Include/internal/pycore_runtime.h
Include/internal/pycore_time.h
Include/internal/pycore_typeobject.h

index 7c44a449270202818864868c493b3db6387737bb..01b31d31998e5378cadf73974839c91be88f9bda 100644 (file)
@@ -8,8 +8,8 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
+#include "pycore_interp_structs.h" // struct codecs_state
 #include "pycore_lock.h"          // PyMutex
-#include "pycore_runtime_structs.h"    // struct codecs_state
 
 /* Initialize codecs-related state for the given interpreter, including
    registering the first codec search function. Must be called before any other
index 1ef23588d855274e55310d21d4205bdfb9a8c404..2c6d6daa01994ee6465d6827c93d22d2596bd0d1 100644 (file)
@@ -9,7 +9,7 @@ extern "C" {
 #endif
 
 #include <locale.h>               // struct lconv
-#include "pycore_runtime_structs.h" // _Py_error_handler
+#include "pycore_interp_structs.h" // _Py_error_handler
 
 
 /* A routine to check if a file descriptor can be select()-ed. */
index c33b98cdc43fb40adb84ca797d456275fd4822ca..96b3bc2e6333bc712dc8474ae73a5125291719b4 100644 (file)
@@ -8,8 +8,8 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "pycore_pystate.h"
-#include "pycore_runtime_structs.h"
+#include "pycore_interp_structs.h" // PyGC_Head
+#include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_typedefs.h"      // _PyInterpreterFrame
 
 
index 2b68228f8c6470eef4b1580d0c0539a5fae199a2..f99ab59140f0dced5cb9c0a678df08229adbb5e2 100644 (file)
@@ -9,9 +9,9 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "pycore_lock.h"          // PyMutex
-#include "pycore_runtime_structs.h"  // _import_state
 #include "pycore_hashtable.h"     // _Py_hashtable_t
+#include "pycore_interp_structs.h" // _import_state
+#include "pycore_lock.h"          // PyMutex
 
 extern int _PyImport_IsInitialized(PyInterpreterState *);
 
index eb8ed2ec6ac2c779d6442c17c029adfebb16a852..49eedd8d2a2332d98773fb67962075139b811468 100644 (file)
@@ -8,9 +8,6 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include <stdbool.h>              // bool
-
-#include "pycore_runtime_structs.h"
 #include "pycore_genobject.h"     // _PyGen_FetchStopIterationValue
 
 
index bda8a30dd1d0ad80502488267681862b6834178e..7fc7f343fe600f8692da44c2ccfee11a33d26bdf 100644 (file)
@@ -8,7 +8,8 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "pycore_runtime_structs.h"
+#include "pycore_runtime_structs.h" // _PyRuntimeState
+
 
 /* API */
 
index f50c43d8e552b51e5dfca68231d50a790c77b88a..23312471c6584efee837e0b5c51cf6401391afa5 100644 (file)
@@ -57,7 +57,7 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "pycore_runtime_structs.h"
+#include "pycore_runtime_structs.h" // _PyTimeFraction
 
 #ifdef __clang__
 struct timeval;
index a5bea7116ba807eb306bbf77b2bed88e67ea04b6..cd36400c0d3e956b95d6dcea79cf0d695091cc0c 100644 (file)
@@ -9,8 +9,8 @@ extern "C" {
 #endif
 
 #include "pycore_function.h"
+#include "pycore_interp_structs.h" // managed_static_type_state
 #include "pycore_moduleobject.h"  // PyModuleObject
-#include "pycore_runtime_structs.h" // type state
 #include "pycore_stats.h"