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

gh-91321: Fix test_cppext for C++03 #93902

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Lib/test/setup_testcppext.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
'-Werror',
# Warn on old-style cast (C cast) like: (PyObject*)op
'-Wold-style-cast',
# Warn when using NULL rather than _Py_NULL in static inline functions
'-Wzero-as-null-pointer-constant',
]
else:
# Don't pass any compiler flag to MSVC
Expand All @@ -39,6 +37,10 @@ def main():
name = '_testcpp11ext'

cppflags = [*CPPFLAGS, f'-std={std}']
if std == 'c++11':
# Warn when using NULL rather than _Py_NULL in static inline functions
cppflags.append('-Wzero-as-null-pointer-constant')

cpp_ext = Extension(
name,
sources=[SOURCE],
Expand Down