We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7546914 commit a38c2a6Copy full SHA for a38c2a6
Lib/test/setup_testcppext.py
@@ -19,8 +19,6 @@
19
'-Werror',
20
# Warn on old-style cast (C cast) like: (PyObject*)op
21
'-Wold-style-cast',
22
- # Warn when using NULL rather than _Py_NULL in static inline functions
23
- '-Wzero-as-null-pointer-constant',
24
]
25
else:
26
# Don't pass any compiler flag to MSVC
@@ -39,6 +37,10 @@ def main():
39
37
name = '_testcpp11ext'
40
38
41
cppflags = [*CPPFLAGS, f'-std={std}']
+ if std == 'c++11':
+ # Warn when using NULL rather than _Py_NULL in static inline functions
42
+ cppflags.append('-Wzero-as-null-pointer-constant')
43
+
44
cpp_ext = Extension(
45
name,
46
sources=[SOURCE],
0 commit comments