]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39026: Fix Python.h when building with Xcode (GH-29488)
authorVictor Stinner <vstinner@python.org>
Tue, 23 Nov 2021 17:58:57 +0000 (18:58 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Nov 2021 17:58:57 +0000 (18:58 +0100)
Fix Python.h to build C extensions with Xcode: remove a relative
include from Include/cpython/pystate.h.

Include/Python.h
Include/cpython/pystate.h
Misc/NEWS.d/next/C API/2021-11-09-15-42-11.bpo-39026.sUnYWn.rst [new file with mode: 0644]

index 6e3303ac9a3b0c83db79653035e32ce760d12f2e..7260ae5cd0b4fe794d092fdb2c2476115fc18208 100644 (file)
@@ -72,6 +72,7 @@
 #include "sliceobject.h"
 #include "cpython/cellobject.h"
 #include "iterobject.h"
+#include "cpython/initconfig.h"
 #include "pystate.h"
 #include "cpython/genobject.h"
 #include "descrobject.h"
@@ -83,7 +84,6 @@
 #include "cpython/pytime.h"
 #include "codecs.h"
 #include "pyerrors.h"
-#include "cpython/initconfig.h"
 #include "pythread.h"
 #include "cpython/context.h"
 #include "modsupport.h"
index 9ac0a298baab4e8298f547948c2ba530c6168289..5adbf3b4953166be4ec0ea60d7437269a2a61e68 100644 (file)
@@ -2,8 +2,6 @@
 #  error "this header file must not be included directly"
 #endif
 
-#include "cpython/initconfig.h"
-
 PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
 PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);
 
diff --git a/Misc/NEWS.d/next/C API/2021-11-09-15-42-11.bpo-39026.sUnYWn.rst b/Misc/NEWS.d/next/C API/2021-11-09-15-42-11.bpo-39026.sUnYWn.rst
new file mode 100644 (file)
index 0000000..77a0119
--- /dev/null
@@ -0,0 +1,2 @@
+Fix Python.h to build C extensions with Xcode: remove a relative include
+from ``Include/cpython/pystate.h``.