aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/_threadmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_threadmodule.c')
-rw-r--r--Modules/_threadmodule.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index 150a266b521..b6ccca943f2 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -1365,9 +1365,7 @@ static void
localdummy_dealloc(PyObject *op)
{
localdummyobject *self = localdummyobject_CAST(op);
- if (self->weakreflist != NULL) {
- PyObject_ClearWeakRefs(op);
- }
+ FT_CLEAR_WEAKREFS(op, self->weakreflist);
PyTypeObject *tp = Py_TYPE(self);
tp->tp_free(self);
Py_DECREF(tp);