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

(cherry picked from commit 4ae26b9c1d0c33e3db92c6f305293f9240dea358)

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 a83befa31173618e1811c1d645c611a5580b103b..d3186c32e35500e4834eea4283ee3d630bbb9410 100644 (file)
 #include "sliceobject.h"
 #include "cellobject.h"
 #include "iterobject.h"
+#include "cpython/initconfig.h"
 #include "genobject.h"
 #include "descrobject.h"
 #include "genericaliasobject.h"
 
 #include "codecs.h"
 #include "pyerrors.h"
-
-#include "cpython/initconfig.h"
 #include "pythread.h"
 #include "pystate.h"
 #include "context.h"
index b0d30bd07931327a162af9b175bfae2277e84682..7c995b93074f6ed6afa7fc1c06a550a837aad95c 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``.