From 496c53d83e736c54d3790c61b0d389df286c0a27 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 45f9f575781..2292a9ec984 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -889,9 +889,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; }