Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Activate the ``GC_DEBUG`` macro for debug builds of the interpreter (when
``Py_DEBUG`` is set). Patch by Pablo Galindo.
7 changes: 5 additions & 2 deletions Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down