[Python-checkins] cpython (3.4): use NULL not 0

benjamin.peterson python-checkins at python.org
Fri Jun 27 08:29:33 CEST 2014


http://hg.python.org/cpython/rev/92521be371c5
changeset:   91435:92521be371c5
branch:      3.4
parent:      91432:62612b195cb5
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Jun 26 23:29:13 2014 -0700
summary:
  use NULL not 0

files:
  Objects/abstract.c |  15 ++++++---------
  1 files changed, 6 insertions(+), 9 deletions(-)


diff --git a/Objects/abstract.c b/Objects/abstract.c
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2191,9 +2191,8 @@
         return null_error();
 
     func = PyObject_GetAttrString(o, name);
-    if (func == NULL) {
-        return 0;
-    }
+    if (func == NULL)
+        return NULL;
 
     va_start(va, format);
     retval = callmethod(func, format, va, 0);
@@ -2213,9 +2212,8 @@
         return null_error();
 
     func = _PyObject_GetAttrId(o, name);
-    if (func == NULL) {
-        return 0;
-    }
+    if (func == NULL)
+        return NULL;
 
     va_start(va, format);
     retval = callmethod(func, format, va, 0);
@@ -2235,9 +2233,8 @@
         return null_error();
 
     func = PyObject_GetAttrString(o, name);
-    if (func == NULL) {
-        return 0;
-    }
+    if (func == NULL)
+        return NULL;
     va_start(va, format);
     retval = callmethod(func, format, va, 1);
     va_end(va);

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


More information about the Python-checkins mailing list