[Python-checkins] cpython: Fix "unicode_escape" encoder

victor.stinner python-checkins at python.org
Thu Nov 10 20:13:39 CET 2011


http://hg.python.org/cpython/rev/5a9248c32b87
changeset:   73481:5a9248c32b87
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Thu Nov 10 20:15:25 2011 +0100
summary:
  Fix "unicode_escape" encoder

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
@@ -5938,7 +5938,7 @@
     p = PyBytes_AS_STRING(repr);
 
     for (i = 0; i < len; i++) {
-        Py_UNICODE ch = PyUnicode_READ(kind, data, i);
+        Py_UCS4 ch = PyUnicode_READ(kind, data, i);
 
         /* Escape backslashes */
         if (ch == '\\') {

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


More information about the Python-checkins mailing list