Skip to content

Commit 4ae26b9

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

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Include/Python.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
#include "sliceobject.h"
7373
#include "cpython/cellobject.h"
7474
#include "iterobject.h"
75+
#include "cpython/initconfig.h"
7576
#include "pystate.h"
7677
#include "cpython/genobject.h"
7778
#include "descrobject.h"
@@ -83,7 +84,6 @@
8384
#include "cpython/pytime.h"
8485
#include "codecs.h"
8586
#include "pyerrors.h"
86-
#include "cpython/initconfig.h"
8787
#include "pythread.h"
8888
#include "cpython/context.h"
8989
#include "modsupport.h"

Include/cpython/pystate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# error "this header file must not be included directly"
33
#endif
44

5-
#include "cpython/initconfig.h"
6-
75
PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
86
PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);
97

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)