Commit 2787ea41 authored by Brian Curtin's avatar Brian Curtin

Fix a compile error (apparently Windows only) introduced in 295fdfd4f422

parent cf85c300
...@@ -8213,6 +8213,7 @@ charmap_encoding_error( ...@@ -8213,6 +8213,7 @@ charmap_encoding_error(
char *reason = "character maps to <undefined>"; char *reason = "character maps to <undefined>";
charmapencode_result x; charmapencode_result x;
Py_UCS4 ch; Py_UCS4 ch;
int val;
if (PyUnicode_READY(unicode) < 0) if (PyUnicode_READY(unicode) < 0)
return -1; return -1;
...@@ -8222,8 +8223,8 @@ charmap_encoding_error( ...@@ -8222,8 +8223,8 @@ charmap_encoding_error(
PyObject *rep; PyObject *rep;
if (Py_TYPE(mapping) == &EncodingMapType) { if (Py_TYPE(mapping) == &EncodingMapType) {
ch = PyUnicode_READ_CHAR(unicode, collendpos); ch = PyUnicode_READ_CHAR(unicode, collendpos);
int res = encoding_map_lookup(ch, mapping); val = encoding_map_lookup(ch, mapping);
if (res != -1) if (val != -1)
break; break;
++collendpos; ++collendpos;
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment