use Py_CLEAR

This commit is contained in:
Benjamin Peterson 2012-02-19 01:11:56 -05:00
parent fbc6f943e0
commit 496c53d83e
1 changed files with 1 additions and 3 deletions

View File

@ -889,9 +889,7 @@ sm_traverse(staticmethod *sm, visitproc visit, void *arg)
static int static int
sm_clear(staticmethod *sm) sm_clear(staticmethod *sm)
{ {
Py_XDECREF(sm->sm_callable); Py_CLEAR(sm->sm_callable);
sm->sm_callable = NULL;
return 0; return 0;
} }