mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
gh-94731: Revert to C-style casts for _Py_CAST (GH-94782)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
This commit is contained in:
parent
81dca70d70
commit
6cbb57f62d
5 changed files with 85 additions and 59 deletions
|
@ -17,8 +17,6 @@ if not MS_WINDOWS:
|
|||
# a C++ extension using the Python C API does not emit C++ compiler
|
||||
# warnings
|
||||
'-Werror',
|
||||
# Warn on old-style cast (C cast) like: (PyObject*)op
|
||||
'-Wold-style-cast',
|
||||
]
|
||||
else:
|
||||
# Don't pass any compiler flag to MSVC
|
||||
|
@ -37,9 +35,6 @@ 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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue