Skip to content

Commit 8c38158

Browse files
committed
gh-131238: Remove pycore_lock.h includes
PyMutex type is now part of <Python.h>, it's no longer needed to include <pycore_lock.h> to get it.
1 parent a8cb5e4 commit 8c38158

16 files changed

+4
-17
lines changed

Include/internal/pycore_ast_state.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_atexit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef Py_INTERNAL_ATEXIT_H
22
#define Py_INTERNAL_ATEXIT_H
33

4-
#include "pycore_lock.h" // PyMutex
5-
64
#ifdef __cplusplus
75
extern "C" {
86
#endif

Include/internal/pycore_brc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <stdint.h>
55
#include "pycore_llist.h" // struct llist_node
6-
#include "pycore_lock.h" // PyMutex
76
#include "pycore_object_stack.h" // _PyObjectStack
87

98
#ifdef __cplusplus

Include/internal/pycore_ceval_state.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
1211
#include "pycore_gil.h" // struct _gil_runtime_state
1312

1413

Include/internal/pycore_code.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ extern "C" {
1010

1111
#include "pycore_structs.h" // _Py_CODEUNIT
1212
#include "pycore_stackref.h" // _PyStackRef
13-
#include "pycore_lock.h" // PyMutex
1413
#include "pycore_backoff.h" // _Py_BackoffCounter
1514
#include "pycore_tstate.h" // _PyThreadStateImpl
1615

Include/internal/pycore_codecs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
1211
#include "pycore_runtime_structs.h" // struct codecs_state
1312

1413
/* Initialize codecs-related state for the given interpreter, including

Include/internal/pycore_critical_section.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# error "this header requires Py_BUILD_CORE define"
66
#endif
77

8-
#include "pycore_lock.h" // PyMutex
98
#include "pycore_pystate.h" // _PyThreadState_GET()
109
#include <stdint.h>
1110

Include/internal/pycore_crossinterp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
1211
#include "pycore_pyerrors.h"
1312

1413

Include/internal/pycore_function.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
extern "C" {
55
#endif
66

7-
#include "pycore_lock.h"
8-
97
#ifndef Py_BUILD_CORE
108
# error "this header requires Py_BUILD_CORE define"
119
#endif

Include/internal/pycore_import.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ extern "C" {
99
# error "this header requires Py_BUILD_CORE define"
1010
#endif
1111

12-
#include "pycore_lock.h" // PyMutex
1312
#include "pycore_runtime_structs.h" // _import_state
1413
#include "pycore_hashtable.h" // _Py_hashtable_t
1514

Include/internal/pycore_pymem.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define Py_INTERNAL_PYMEM_H
33

44
#include "pycore_llist.h" // struct llist_node
5-
#include "pycore_lock.h" // PyMutex
65

76
#ifdef __cplusplus
87
extern "C" {

Include/internal/pycore_qsbr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include <stdbool.h>
1313
#include <stdint.h>
14-
#include "pycore_lock.h" // PyMutex
1514

1615
#ifdef __cplusplus
1716
extern "C" {

Include/internal/pycore_unicodeobject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#include "pycore_lock.h" // PyMutex
1211
#include "pycore_fileutils.h" // _Py_error_handler
1312
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
1413
#include "pycore_global_objects.h" // _Py_SINGLETON

Include/internal/pycore_weakref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extern "C" {
99
#endif
1010

1111
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
12-
#include "pycore_lock.h"
12+
#include "pycore_lock.h" // PyMutex_LockFlags()
1313
#include "pycore_object.h" // _Py_REF_IS_MERGED()
1414
#include "pycore_pyatomic_ft_wrappers.h"
1515

Modules/_testinternalcapi/test_critical_sections.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "parts.h"
66
#include "pycore_critical_section.h"
7+
#include "pycore_lock.h" // PyEvent
78

89
#ifdef MS_WINDOWS
910
# include <windows.h> // Sleep()

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,7 @@ def write_internal_h_header(mod, f):
23682368
#ifndef Py_INTERNAL_AST_STATE_H
23692369
#define Py_INTERNAL_AST_STATE_H
23702370
2371-
#include "pycore_lock.h" // _PyOnceFlag
2371+
#include "pycore_lock.h" // _PyOnceFlag
23722372
23732373
#ifdef __cplusplus
23742374
extern "C" {

0 commit comments

Comments
 (0)