Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce5a646

Browse files
authored
bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29732)
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 632d589 commit ce5a646

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Include/Python.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
#include "sliceobject.h"
107107
#include "cellobject.h"
108108
#include "iterobject.h"
109+
#include "cpython/initconfig.h"
109110
#include "genobject.h"
110111
#include "descrobject.h"
111112
#include "genericaliasobject.h"
@@ -118,8 +119,6 @@
118119

119120
#include "codecs.h"
120121
#include "pyerrors.h"
121-
122-
#include "cpython/initconfig.h"
123122
#include "pythread.h"
124123
#include "pystate.h"
125124
#include "context.h"

Include/cpython/pystate.h

-2
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

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)