summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-11-02 20:09:37 (GMT)
committerBrian Curtin <brian@python.org>2011-11-02 20:09:37 (GMT)
commit2787ea41fd11b8e0a0514e13b61af8e12764a8f6 (patch)
tree840caade6284acfa38f2d0ac0409fbad8f890458 /Objects
parentcf85c300cfc26c78029695adef917b5b165495d2 (diff)
downloadcpython-2787ea41fd11b8e0a0514e13b61af8e12764a8f6.zip
cpython-2787ea41fd11b8e0a0514e13b61af8e12764a8f6.tar.gz
cpython-2787ea41fd11b8e0a0514e13b61af8e12764a8f6.tar.bz2
Fix a compile error (apparently Windows only) introduced in 295fdfd4f422
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 0ecbd1d..73f7926 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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;