mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
Fix "unicode_escape" encoder
This commit is contained in:
parent
0e36826a04
commit
3326cb6a36
@ -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 == '\\') {
|
||||
|
Loading…
Reference in New Issue
Block a user