Skip to content

Commit 73e6386

Browse files
committed
Test -Wold-style-cast -Wzero-as-null-pointer-constant on Python 3.12
1 parent ef761f0 commit 73e6386

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/setup.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
import os.path
3+
import sys
34

45

56
TEST_CPP = False
@@ -22,16 +23,19 @@
2223
# mixture of designated and non-designated initializers
2324
'-std=c99',
2425
]
25-
CPPFLAGS = COMMON_FLAGS + [
26-
# no C++ option yet
27-
]
26+
CPPFLAGS = list(COMMON_FLAGS)
27+
if sys.version_info >= (3, 12):
28+
CPPFLAGS.extend((
29+
'-Wold-style-cast',
30+
'-Wzero-as-null-pointer-constant',
31+
))
32+
2833

2934
def main():
3035
try:
3136
from setuptools import setup, Extension
3237
except ImportError:
3338
from distutils.core import setup, Extension
34-
import sys
3539

3640
if len(sys.argv) >= 3 and sys.argv[2] == '--build-cppext':
3741
global TEST_CPP

0 commit comments

Comments
 (0)