From 32c49d95330870bfb8c0403eabb46b6434dcea39 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 19 Feb 2012 01:11:56 -0500 Subject: [PATCH] use Py_CLEAR --- Objects/funcobject.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Objects/funcobject.c b/Objects/funcobject.c index ad0f427f59..51b6c9d4bd 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -784,9 +784,7 @@ sm_traverse(staticmethod *sm, visitproc visit, void *arg) static int sm_clear(staticmethod *sm) { - Py_XDECREF(sm->sm_callable); - sm->sm_callable = NULL; - + Py_CLEAR(sm->sm_callable); return 0; } -- 2.40.0