Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions Lib/test/test_cext/extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ static PyMethodDef _testcext_methods[] = {


static int
_testcext_exec(PyObject *module)
_testcext_exec(
#ifdef __STDC_VERSION__
PyObject *module
#else
PyObject *Py_UNUSED(module)
#endif
)
{
#ifdef __STDC_VERSION__
if (PyModule_AddIntMacro(module, __STDC_VERSION__) < 0) {
Expand All @@ -53,7 +59,7 @@ _testcext_exec(PyObject *module)
}

static PyModuleDef_Slot _testcext_slots[] = {
{Py_mod_exec, _testcext_exec},
{Py_mod_exec, (void*)_testcext_exec},
{0, NULL}
};

Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_cext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
else:
# MSVC compiler flags
CFLAGS = [
# Display warnings level 1 to 4
'/W4',
# Treat all compiler warnings as compiler errors
'/WX',
]
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_cppext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
else:
# MSVC compiler flags
CPPFLAGS = [
# Display warnings level 1 to 4
'/W4',
# Treat all compiler warnings as compiler errors
'/WX',
]
Expand Down
Loading