diff options
| author | Benjamin Peterson <benjamin@python.org> | 2012-02-19 06:11:56 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2012-02-19 06:11:56 (GMT) |
| commit | 32c49d95330870bfb8c0403eabb46b6434dcea39 (patch) | |
| tree | 9e01a92e92065df324dfa6df9dc0edd9917b6ba8 | |
| parent | f5f6af81ac676e31ad11f0b943c4449b62fc1501 (diff) | |
| download | cpython-32c49d95330870bfb8c0403eabb46b6434dcea39.zip cpython-32c49d95330870bfb8c0403eabb46b6434dcea39.tar.gz cpython-32c49d95330870bfb8c0403eabb46b6434dcea39.tar.bz2 | |
use Py_CLEAR
| -rw-r--r-- | Objects/funcobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index ad0f427..51b6c9d 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; } |
