bpo-45434: Python.h no longer includes <stdlib.h> (GH-28888)

This commit is contained in:
Victor Stinner 2021-10-11 23:30:00 +02:00 committed by GitHub
parent 7103356455
commit 03ea862b8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -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
----------

View file

@ -25,7 +25,6 @@
#ifdef HAVE_ERRNO_H
# include <errno.h> // errno
#endif
#include <stdlib.h>
#ifndef MS_WINDOWS
# include <unistd.h>
#endif

View file

@ -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.