summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-10-10 21:45:17 (GMT)
committerGitHub <noreply@github.com>2019-10-10 21:45:17 (GMT)
commit320dd504ddf65efe946e6d1e89053ed2d7ebe1e9 (patch)
tree8fc7695bc3dc0c88801c99612cf597a160e167d9 /Modules/gcmodule.c
parent72bbd2a2e34a9e58d4bc9eae4c84c15a656215be (diff)
downloadcpython-320dd504ddf65efe946e6d1e89053ed2d7ebe1e9.zip
cpython-320dd504ddf65efe946e6d1e89053ed2d7ebe1e9.tar.gz
cpython-320dd504ddf65efe946e6d1e89053ed2d7ebe1e9.tar.bz2
bpo-38437: Activate GC_DEBUG when PY_DEBUG is set (GH-16707)
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index b1e802e..a1cb323 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -37,7 +37,10 @@ module gc
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b5c9690ecc842d79]*/
-#define GC_DEBUG (0) /* Enable more asserts */
+
+#ifdef Py_DEBUG
+# define GC_DEBUG
+#endif
#define GC_NEXT _PyGCHead_NEXT
#define GC_PREV _PyGCHead_PREV
@@ -316,7 +319,7 @@ append_objects(PyObject *py_list, PyGC_Head *gc_list)
return 0;
}
-#if GC_DEBUG
+#ifdef GC_DEBUG
// validate_list checks list consistency. And it works as document
// describing when expected_mask is set / unset.
static void