From: Benjamin Peterson Date: Sun, 19 Feb 2012 06:11:56 +0000 (-0500) Subject: use Py_CLEAR X-Git-Tag: v2.7.3rc1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32c49d95330870bfb8c0403eabb46b6434dcea39;p=python use Py_CLEAR --- 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; }