summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-10-10 07:32:13 (GMT)
committerGitHub <noreply@github.com>2019-10-10 07:32:13 (GMT)
commita5447735c334a041ee2ffdeb5c7e13d7d4502ea2 (patch)
treee8612be99a8cc5ab87d1c903c860f36c702dabe4 /Modules
parent09895c27cd8ff60563a794016e8c099bc897cc74 (diff)
downloadcpython-a5447735c334a041ee2ffdeb5c7e13d7d4502ea2.zip
cpython-a5447735c334a041ee2ffdeb5c7e13d7d4502ea2.tar.gz
cpython-a5447735c334a041ee2ffdeb5c7e13d7d4502ea2.tar.bz2
bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689)
bpo-38392, bpo-38426: Fix a compiler warning in gcmodule.c. Fix also a typo in PYMEM_DEADBYTE macro comment.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/gcmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 766f8e0..b1e802e 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1921,6 +1921,8 @@ _PyGC_Dump(PyGC_Head *g)
_PyObject_Dump(FROM_GC(g));
}
+
+#ifdef Py_DEBUG
static int
visit_validate(PyObject *op, void *parent_raw)
{
@@ -1931,6 +1933,7 @@ visit_validate(PyObject *op, void *parent_raw)
}
return 0;
}
+#endif
/* extension modules might be compiled with GC support so these