From: Victor Stinner Date: Fri, 26 Nov 2021 09:59:31 +0000 (+0100) Subject: bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776) X-Git-Tag: v3.9.10~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92631a4144fba041a5fb6578620db784821dfdc5;p=thirdparty%2FPython%2Fcpython.git 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 4ae26b9c1d0c33e3db92c6f305293f9240dea358) --- diff --git a/Include/Python.h b/Include/Python.h index 6ee52e749283..7f7ed5981c5c 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -116,6 +116,7 @@ #include "sliceobject.h" #include "cellobject.h" #include "iterobject.h" +#include "cpython/initconfig.h" #include "genobject.h" #include "descrobject.h" #include "genericaliasobject.h" @@ -127,8 +128,6 @@ #include "codecs.h" #include "pyerrors.h" - -#include "cpython/initconfig.h" #include "pythread.h" #include "pystate.h" #include "context.h" diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index f292da1d3c6c..0eb601fd7c55 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -6,8 +6,6 @@ extern "C" { #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 index 000000000000..77a011979215 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-11-09-15-42-11.bpo-39026.sUnYWn.rst @@ -0,0 +1,2 @@ +Fix Python.h to build C extensions with Xcode: remove a relative include +from ``Include/cpython/pystate.h``.