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

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

merged 4 commits into from
Oct 13, 2021

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

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); }

@vstinner vstinner requested a review from a team as a code owner October 13, 2021 16:49
@vstinner vstinner merged commit aac29af into python:main Oct 13, 2021
@vstinner vstinner deleted the stdlib branch October 13, 2021 17:25
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.

3 participants