summaryrefslogtreecommitdiff
path: root/Objects/cellobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/cellobject.c')
-rw-r--r--Objects/cellobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index 97044032fc..e617e5e5f3 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -81,8 +81,7 @@ cell_traverse(PyCellObject *op, visitproc visit, void *arg)
static int
cell_clear(PyCellObject *op)
{
- Py_XDECREF(op->ob_ref);
- op->ob_ref = NULL;
+ Py_CLEAR(op->ob_ref);
return 0;
}