From 2787ea41fd11b8e0a0514e13b61af8e12764a8f6 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Wed, 2 Nov 2011 15:09:37 -0500 Subject: [PATCH] Fix a compile error (apparently Windows only) introduced in 295fdfd4f422 --- Objects/unicodeobject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 0ecbd1d4ae6..73f79268119 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -8213,6 +8213,7 @@ charmap_encoding_error( char *reason = "character maps to "; 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;