summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_testcapimodule.c3
-rw-r--r--Modules/_testinternalcapi.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 8e18b14..101d549 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -10,7 +10,10 @@
The Visual Studio projects builds _testcapi with Py_BUILD_CORE_MODULE
macro defined, but only the public C API must be tested here. */
+
#undef Py_BUILD_CORE_MODULE
+/* Always enable assertions */
+#undef NDEBUG
#define PY_SSIZE_T_CLEAN
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index 9330e26..1b7563c 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -6,6 +6,9 @@
# error "Py_BUILD_CORE_BUILTIN or Py_BUILD_CORE_MODULE must be defined"
#endif
+/* Always enable assertions */
+#undef NDEBUG
+
#define PY_SSIZE_T_CLEAN
#include "Python.h"