[Python-checkins] cpython (2.7): Fixed compilation error introduced in 3f7519f633ed (issue #22518).

serhiy.storchaka python-checkins at python.org
Sat Oct 4 13:53:01 CEST 2014


https://hg.python.org/cpython/rev/d1be1f355f59
changeset:   92796:d1be1f355f59
branch:      2.7
parent:      92790:3f7519f633ed
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sat Oct 04 14:51:44 2014 +0300
summary:
  Fixed compilation error introduced in 3f7519f633ed (issue #22518).

files:
  Python/codecs.c |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Python/codecs.c b/Python/codecs.c
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -569,8 +569,7 @@
         if (end - start > PY_SSIZE_T_MAX / (2+7+1)) {
             end = start + PY_SSIZE_T_MAX / (2+7+1);
 #ifndef Py_UNICODE_WIDE
-            ch = startp[end - 1];
-            if (0xD800 <= ch && ch <= 0xDBFF)
+            if (0xD800 <= startp[end - 1] && startp[end - 1] <= 0xDBFF)
                 end--;
 #endif
         }

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


More information about the Python-checkins mailing list