summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-10-19 10:10:22 (GMT)
committerGitHub <noreply@github.com>2021-10-19 10:10:22 (GMT)
commit52af0756b2ffc6788e364971d05cdaf127d77d5a (patch)
tree8a2175ea934e639eac93bf33b5a22efde8979e9c /Misc
parent0a4c82ddd34a3578684b45b76f49cd289a08740b (diff)
downloadcpython-52af0756b2ffc6788e364971d05cdaf127d77d5a.zip
cpython-52af0756b2ffc6788e364971d05cdaf127d77d5a.tar.gz
cpython-52af0756b2ffc6788e364971d05cdaf127d77d5a.tar.bz2
bpo-45434: Only exclude <stdlib.h> in Python 3.11 limited C API (GH-29027)
The Python 3.11 limited C API no longer includes stdlib.h, stdio.h, string.h and errno.h. * Exclude Py_MEMCPY() from Python 3.11 limited C API. * xxlimited C extension is now built with Python 3.11 limited C API.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2021-10-11-23-03-49.bpo-45434.tsS8I_.rst9
-rw-r--r--Misc/NEWS.d/next/C API/2021-10-15-00-30-45.bpo-45434.XLtsbK.rst5
2 files changed, 4 insertions, 10 deletions
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
index 95c5f0d..627f687 100644
--- 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
@@ -1,6 +1,5 @@
-The ``<Python.h>`` header file no longer includes ``<stdlib.h>``. C
-extensions using ``<stdlib.h>`` must now include it explicitly.
-The system ``<stdlib.h>`` header provides functions like:
-``malloc()``/``free()``, ``getenv()``, ``strtol()``, ``abs()``, ``strtol()``,
-``exit()`` and ``abort()``.
+``<Python.h>`` no longer includes the header files ``<stdlib.h>``,
+``<stdio.h>``, ``<errno.h>`` and ``<string.h>`` when the ``Py_LIMITED_API``
+macro is set to ``0x030b0000`` (Python 3.11) or higher. C extensions should
+explicitly include the header files after ``#include <Python.h>``.
Patch by Victor Stinner.
diff --git a/Misc/NEWS.d/next/C API/2021-10-15-00-30-45.bpo-45434.XLtsbK.rst b/Misc/NEWS.d/next/C API/2021-10-15-00-30-45.bpo-45434.XLtsbK.rst
deleted file mode 100644
index 4a06635..0000000
--- a/Misc/NEWS.d/next/C API/2021-10-15-00-30-45.bpo-45434.XLtsbK.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-The ``<Python.h>`` header file no longer includes ``<stdio.h>`` if the
-``Py_LIMITED_API`` macro is defined. Functions expecting ``FILE*`` are excluded
-from the limited C API (:pep:`384`). C extensions using ``<stdio.h>`` must now
-include it explicitly.
-Patch by Victor Stinner.