summaryrefslogtreecommitdiff
path: root/Objects/funcobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-02-19 01:11:56 -0500
committerBenjamin Peterson <benjamin@python.org>2012-02-19 01:11:56 -0500
commit496c53d83e736c54d3790c61b0d389df286c0a27 (patch)
treeafcb3822ead57a48658b24cb88753c99b3496d0a /Objects/funcobject.c
parentfbc6f943e011397a8523617babc4a438b4df6bb6 (diff)
downloadcpython-git-496c53d83e736c54d3790c61b0d389df286c0a27.tar.gz
use Py_CLEAR
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r--Objects/funcobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 45f9f57578..2292a9ec98 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;
}