Skip to content

Commit 2ebad56

Browse files
committed
use Py_CLEAR
1 parent 1841519 commit 2ebad56

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Objects/funcobject.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,7 @@ sm_traverse(staticmethod *sm, visitproc visit, void *arg)
889889
static int
890890
sm_clear(staticmethod *sm)
891891
{
892-
Py_XDECREF(sm->sm_callable);
893-
sm->sm_callable = NULL;
894-
892+
Py_CLEAR(sm->sm_callable);
895893
return 0;
896894
}
897895

0 commit comments

Comments
 (0)