Skip to content

Commit 5dd21f5

Browse files
authored
bpo-39849: Enable assertions in _testcapimodule.c and _testinternalcapi.c (GH-19623)
1 parent 9b0b5d2 commit 5dd21f5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Modules/_testcapimodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
1111
The Visual Studio projects builds _testcapi with Py_BUILD_CORE_MODULE
1212
macro defined, but only the public C API must be tested here. */
13+
1314
#undef Py_BUILD_CORE_MODULE
15+
/* Always enable assertions */
16+
#undef NDEBUG
1417

1518
#define PY_SSIZE_T_CLEAN
1619

Modules/_testinternalcapi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# error "Py_BUILD_CORE_BUILTIN or Py_BUILD_CORE_MODULE must be defined"
77
#endif
88

9+
/* Always enable assertions */
10+
#undef NDEBUG
11+
912
#define PY_SSIZE_T_CLEAN
1013

1114
#include "Python.h"

0 commit comments

Comments
 (0)