diff options
-rw-r--r-- | Doc/whatsnew/3.11.rst | 4 | ||||
-rw-r--r-- | Include/Python.h | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/C API/2021-10-11-23-03-49.bpo-45434.tsS8I_.rst | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 2262d42..1455a59 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -552,6 +552,10 @@ Porting to Python 3.11 (Contributed by Victor Stinner in :issue:`39573`.) +* The ``<Python.h>`` header file no longer includes ``<stdlib.h>``. C + extensions using ``<stdlib.h>`` must now include it explicitly. + (Contributed by Victor Stinner in :issue:`45434`.) + Deprecated ---------- diff --git a/Include/Python.h b/Include/Python.h index fa77521..8c84c90 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -25,7 +25,6 @@ #ifdef HAVE_ERRNO_H # include <errno.h> // errno #endif -#include <stdlib.h> #ifndef MS_WINDOWS # include <unistd.h> #endif diff --git a/Misc/NEWS.d/next/C API/2021-10-11-23-03-49.bpo-45434.tsS8I_.rst b/Misc/NEWS.d/next/C API/2021-10-11-23-03-49.bpo-45434.tsS8I_.rst new file mode 100644 index 0000000..c04dda5 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-10-11-23-03-49.bpo-45434.tsS8I_.rst @@ -0,0 +1,3 @@ +The ``<Python.h>`` header file no longer includes ``<stdlib.h>``. C +extensions using ``<stdlib.h>`` must now include it explicitly. Patch by +Victor Stinner. |