]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39849: Enable assertions in _testcapimodule.c and _testinternalcapi.c (GH-19623)
authorHai Shi <shihai1992@gmail.com>
Mon, 20 Apr 2020 16:49:13 +0000 (00:49 +0800)
committerGitHub <noreply@github.com>
Mon, 20 Apr 2020 16:49:13 +0000 (01:49 +0900)
Modules/_testcapimodule.c
Modules/_testinternalcapi.c

index 8e18b14a0a8905586aa2c476ba62c0cccbddbf69..101d54932d913dfa0cb19bac61bf72caafb03610 100644 (file)
 
    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
 
index 9330e2625b3a02e0c0f6dea1c55f5e90a5a8f10a..1b7563cb20fc5de7b4d18029e8308deff2c3fa7f 100644 (file)
@@ -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"