Fix "unicode_escape" encoder

This commit is contained in:
Victor Stinner 2011-11-10 20:15:25 +01:00
parent 0e36826a04
commit 3326cb6a36

View File

@ -5938,7 +5938,7 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
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 == '\\') {