[Python-checkins] cpython (3.2): use Py_CLEAR

benjamin.peterson python-checkins at python.org
Sun Feb 19 07:14:40 CET 2012


http://hg.python.org/cpython/rev/ddaf9a2a1d63
changeset:   75029:ddaf9a2a1d63
branch:      3.2
parent:      75025:3a40af30449e
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Feb 19 01:11:56 2012 -0500
summary:
  use Py_CLEAR

files:
  Objects/funcobject.c |  4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)


diff --git a/Objects/funcobject.c b/Objects/funcobject.c
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -889,9 +889,7 @@
 static int
 sm_clear(staticmethod *sm)
 {
-    Py_XDECREF(sm->sm_callable);
-    sm->sm_callable = NULL;
-
+    Py_CLEAR(sm->sm_callable);
     return 0;
 }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list