diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-13 17:25:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 17:25:53 (GMT) |
commit | aac29af6785712019d34f1a7f15b3c408a4f68ae (patch) | |
tree | ca44f1d999551118d5ab06e5994b6291d387e3e1 /Include | |
parent | db2b6a20cd35781b2f5e798e880e57e6cf9b97aa (diff) | |
download | cpython-aac29af6785712019d34f1a7f15b3c408a4f68ae.zip cpython-aac29af6785712019d34f1a7f15b3c408a4f68ae.tar.gz cpython-aac29af6785712019d34f1a7f15b3c408a4f68ae.tar.bz2 |
bpo-45434: pyport.h no longer includes <stdlib.h> (GH-28914)
Include <stdlib.h> explicitly in C files.
Python.h includes <wchar.h>.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/Python.h | 3 | ||||
-rw-r--r-- | Include/internal/pycore_fileutils.h | 3 | ||||
-rw-r--r-- | Include/pyport.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Include/Python.h b/Include/Python.h index 8c84c90..4f62103 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -33,7 +33,8 @@ # include <stddef.h> #endif -#include <assert.h> +#include <assert.h> // assert() +#include <wchar.h> // wchar_t #include "pyport.h" #include "pymacro.h" diff --git a/Include/internal/pycore_fileutils.h b/Include/internal/pycore_fileutils.h index 2316a97..3464477 100644 --- a/Include/internal/pycore_fileutils.h +++ b/Include/internal/pycore_fileutils.h @@ -88,6 +88,9 @@ extern int _Py_add_relfile(wchar_t *dirname, // ... // _Py_END_SUPPRESS_IPH #if defined _MSC_VER && _MSC_VER >= 1900 + +# include <stdlib.h> // _set_thread_local_invalid_parameter_handler() + extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler; # define _Py_BEGIN_SUPPRESS_IPH \ { _invalid_parameter_handler _Py_old_handler = \ diff --git a/Include/pyport.h b/Include/pyport.h index 6e4e980..0bec2a9 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -205,8 +205,6 @@ typedef Py_ssize_t Py_ssize_clean_t; * see https://bugs.python.org/issue28126 */ #define Py_MEMCPY memcpy -#include <stdlib.h> - #ifdef HAVE_IEEEFP_H #include <ieeefp.h> /* needed for 'finite' declaration on some platforms */ #endif |