[Python-checkins] cpython: == -1 is convention

benjamin.peterson python-checkins at python.org
Mon Jan 2 16:00:49 CET 2012


http://hg.python.org/cpython/rev/bea974c88faf
changeset:   74235:bea974c88faf
parent:      74229:86e2603f6adb
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Jan 01 16:04:29 2012 -0600
summary:
  == -1 is convention

files:
  Objects/unicodeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8770,7 +8770,7 @@
                                                                  collstart, collend, &newpos);
                 if (repunicode == NULL)
                     goto onError;
-                if (PyUnicode_READY(repunicode) < 0) {
+                if (PyUnicode_READY(repunicode) == -1) {
                     Py_DECREF(repunicode);
                     goto onError;
                 }

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


More information about the Python-checkins mailing list