[Python-checkins] cpython (merge 3.6 -> default): Issue #29044: Merge 3.6.

xiang.zhang python-checkins at python.org
Thu Dec 22 02:38:06 EST 2016


https://hg.python.org/cpython/rev/a1d5388d5da9
changeset:   105780:a1d5388d5da9
parent:      105777:41031fdc924a
parent:      105779:cc61d1d45291
user:        Xiang Zhang <angwerzx at 126.com>
date:        Thu Dec 22 15:31:55 2016 +0800
summary:
  Issue #29044: Merge 3.6.

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


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -14286,11 +14286,12 @@
             if (iobj == NULL) {
                 goto onError;
             }
-            v = iobj;
+            x = PyLong_AsLong(iobj);
             Py_DECREF(iobj);
         }
-        /* Integer input truncated to a character */
-        x = PyLong_AsLong(v);
+        else {
+            x = PyLong_AsLong(v);
+        }
         if (x == -1 && PyErr_Occurred())
             goto onError;
 

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


More information about the Python-checkins mailing list