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

This commit is contained in:
Brian Curtin 2011-11-02 15:09:37 -05:00
parent cf85c300cf
commit 2787ea41fd
1 changed files with 3 additions and 2 deletions

View File

@ -8213,6 +8213,7 @@ charmap_encoding_error(
char *reason = "character maps to <undefined>";
charmapencode_result x;
Py_UCS4 ch;
int val;
if (PyUnicode_READY(unicode) < 0)
return -1;
@ -8222,8 +8223,8 @@ charmap_encoding_error(
PyObject *rep;
if (Py_TYPE(mapping) == &EncodingMapType) {
ch = PyUnicode_READ_CHAR(unicode, collendpos);
int res = encoding_map_lookup(ch, mapping);
if (res != -1)
val = encoding_map_lookup(ch, mapping);
if (val != -1)
break;
++collendpos;
continue;