Skip to content

Commit a741102

Browse files
authored
gh-131238: Use pycore_interp_structs.h header (#131481)
Replace pycore_runtime_structs.h include with pycore_interp_structs.h include in internal headers.
1 parent a8cb5e4 commit a741102

8 files changed

+10
-12
lines changed

Include/internal/pycore_codecs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11+
#include "pycore_interp_structs.h" // struct codecs_state
1112
#include "pycore_lock.h" // PyMutex
12-
#include "pycore_runtime_structs.h" // struct codecs_state
1313

1414
/* Initialize codecs-related state for the given interpreter, including
1515
registering the first codec search function. Must be called before any other

Include/internal/pycore_fileutils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extern "C" {
99
#endif
1010

1111
#include <locale.h> // struct lconv
12-
#include "pycore_runtime_structs.h" // _Py_error_handler
12+
#include "pycore_interp_structs.h" // _Py_error_handler
1313

1414

1515
/* A routine to check if a file descriptor can be select()-ed. */

Include/internal/pycore_gc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_pystate.h"
12-
#include "pycore_runtime_structs.h"
11+
#include "pycore_interp_structs.h" // PyGC_Head
12+
#include "pycore_pystate.h" // _PyInterpreterState_GET()
1313
#include "pycore_typedefs.h" // _PyInterpreterFrame
1414

1515

Include/internal/pycore_import.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ extern "C" {
99
# error "this header requires Py_BUILD_CORE define"
1010
#endif
1111

12-
#include "pycore_lock.h" // PyMutex
13-
#include "pycore_runtime_structs.h" // _import_state
1412
#include "pycore_hashtable.h" // _Py_hashtable_t
13+
#include "pycore_interp_structs.h" // _import_state
14+
#include "pycore_lock.h" // PyMutex
1515

1616
extern int _PyImport_IsInitialized(PyInterpreterState *);
1717

Include/internal/pycore_interp.h

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include <stdbool.h> // bool
12-
13-
#include "pycore_runtime_structs.h"
1411
#include "pycore_genobject.h" // _PyGen_FetchStopIterationValue
1512

1613

Include/internal/pycore_runtime.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_runtime_structs.h"
11+
#include "pycore_runtime_structs.h" // _PyRuntimeState
12+
1213

1314
/* API */
1415

Include/internal/pycore_time.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extern "C" {
5757
# error "this header requires Py_BUILD_CORE define"
5858
#endif
5959

60-
#include "pycore_runtime_structs.h"
60+
#include "pycore_runtime_structs.h" // _PyTimeFraction
6161

6262
#ifdef __clang__
6363
struct timeval;

Include/internal/pycore_typeobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ extern "C" {
99
#endif
1010

1111
#include "pycore_function.h"
12+
#include "pycore_interp_structs.h" // managed_static_type_state
1213
#include "pycore_moduleobject.h" // PyModuleObject
13-
#include "pycore_runtime_structs.h" // type state
1414
#include "pycore_stats.h"
1515

1616

0 commit comments

Comments
 (0)