diff options
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r-- | Objects/weakrefobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index a116efc863..a8ab56ecd8 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -109,8 +109,7 @@ weakref_dealloc(PyObject *self) static int gc_traverse(PyWeakReference *self, visitproc visit, void *arg) { - if (self->wr_callback != NULL) - return visit(self->wr_callback, arg); + Py_VISIT(self->wr_callback); return 0; } |