X Tutup
Skip to content

Commit 62183b8

Browse files
authored
bpo-40268: Remove explicit pythread.h includes (python#19529)
Remove explicit pythread.h includes: it is always included by Python.h.
1 parent d01628e commit 62183b8

28 files changed

+7
-46
lines changed

Include/Python.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
#include "pyerrors.h"
132132

133133
#include "cpython/initconfig.h"
134+
#include "pythread.h"
134135
#include "pystate.h"
135136
#include "context.h"
136137

Include/pystate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
extern "C" {
88
#endif
99

10-
#include "pythread.h"
11-
1210
/* This limitation is for performance and simplicity. If needed it can be
1311
removed (with effort). */
1412
#define MAX_CO_EXTRA_USERS 255

Modules/_blake2/blake2b_impl.c

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

1616
#include "Python.h"
1717
#include "pystrhex.h"
18-
#include "pythread.h"
1918

2019
#include "../hashlib.h"
2120
#include "blake2ns.h"

Modules/_blake2/blake2s_impl.c

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

1616
#include "Python.h"
1717
#include "pystrhex.h"
18-
#include "pythread.h"
1918

2019
#include "../hashlib.h"
2120
#include "blake2ns.h"

Modules/_bz2module.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include "Python.h"
66
#include "structmember.h"
77

8-
#include "pythread.h"
9-
108
#include <bzlib.h>
119
#include <stdio.h>
1210

Modules/_decimal/_decimal.c

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

2929
#include <Python.h>
3030
#include "longintrepr.h"
31-
#include "pythread.h"
3231
#include "structmember.h"
3332
#include "complexobject.h"
3433
#include "mpdecimal.h"

Modules/_io/bufferedio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "Python.h"
1212
#include "pycore_object.h"
1313
#include "structmember.h"
14-
#include "pythread.h"
1514
#include "_iomodule.h"
1615

1716
/*[clinic input]

Modules/_lzmamodule.c

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

1010
#include "Python.h"
1111
#include "structmember.h"
12-
#include "pythread.h"
1312

1413
#include <stdarg.h>
1514
#include <string.h>

Modules/_queuemodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "Python.h"
22
#include "structmember.h" /* offsetof */
3-
#include "pythread.h"
43

54
/*[clinic input]
65
module _queue

Modules/_sqlite/connection.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#include "prepare_protocol.h"
3131
#include "util.h"
3232

33-
#include "pythread.h"
34-
3533
#define ACTION_FINALIZE 1
3634
#define ACTION_RESET 2
3735

0 commit comments

Comments
 (0)
X Tutup