]> granicus.if.org Git - python/commitdiff
use Py_CLEAR
authorBenjamin Peterson <benjamin@python.org>
Sun, 19 Feb 2012 06:11:56 +0000 (01:11 -0500)
committerBenjamin Peterson <benjamin@python.org>
Sun, 19 Feb 2012 06:11:56 +0000 (01:11 -0500)
Objects/funcobject.c

index ad0f427f59462efa781b19b7ab384479e0289e99..51b6c9d4bd11e36a73e99694bd77436393634f08 100644 (file)
@@ -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;
 }