Skip to content

Commit 92631a4

Browse files
authored
bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776)
Fix Python.h to build C extensions with Xcode: remove a relative include from Include/cpython/pystate.h. (cherry picked from commit 4ae26b9)
1 parent b524934 commit 92631a4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Include/Python.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
#include "sliceobject.h"
117117
#include "cellobject.h"
118118
#include "iterobject.h"
119+
#include "cpython/initconfig.h"
119120
#include "genobject.h"
120121
#include "descrobject.h"
121122
#include "genericaliasobject.h"
@@ -127,8 +128,6 @@
127128

128129
#include "codecs.h"
129130
#include "pyerrors.h"
130-
131-
#include "cpython/initconfig.h"
132131
#include "pythread.h"
133132
#include "pystate.h"
134133
#include "context.h"

Include/cpython/pystate.h

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

9-
#include "cpython/initconfig.h"
10-
119
PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
1210
PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);
1311

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix Python.h to build C extensions with Xcode: remove a relative include
2+
from ``Include/cpython/pystate.h``.

0 commit comments

Comments
 (0)