From 3326cb6a36c6f2545d19d4cc29d5225223c2a3a2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 10 Nov 2011 20:15:25 +0100 Subject: [PATCH] Fix "unicode_escape" encoder --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 6174998e1a9..4c509b4b39f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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 == '\\') {