Skip to content

gh-131238: Use pycore_interp_structs.h header #131481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Include/internal/pycore_codecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_fileutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
4 changes: 2 additions & 2 deletions Include/internal/pycore_gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions Include/internal/pycore_import.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
3 changes: 0 additions & 3 deletions Include/internal/pycore_interp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_typeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
Loading