Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45434: pyport.h no longer includes <stdlib.h> #28914

Merged
merged 4 commits into from Oct 13, 2021
Merged

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 13, 2021

Include <stdlib.h> explicitly in C files.

Python.h includes <wchar.h>.

https://bugs.python.org/issue45434

@vstinner
Copy link
Member Author

@vstinner vstinner commented Oct 13, 2021

The build fails on Windows because of these macros which use <stdlib.h>:

extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
#define _Py_BEGIN_SUPPRESS_IPH { _invalid_parameter_handler _Py_old_handler = \
    _set_thread_local_invalid_parameter_handler(_Py_silent_invalid_parameter_handler);
#define _Py_END_SUPPRESS_IPH _set_thread_local_invalid_parameter_handler(_Py_old_handler); }

Include <stdlib.h> explicitly in C files.

Python.h includes <wchar.h>.
@vstinner vstinner requested a review from as a code owner Oct 13, 2021
@vstinner vstinner merged commit aac29af into python:main Oct 13, 2021
12 checks passed
@vstinner vstinner deleted the stdlib branch Oct 13, 2021
methane pushed a commit to methane/cpython that referenced this issue Oct 20, 2021
Include <stdlib.h> explicitly in C files.

Python.h includes <wchar.h>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants