python2/python-2.7rc1-codec-ascii-tolower.patch
dmalcolm c6247fd398 - add patch to fixup the new sysconfig.py for our multilib support on
64-bit (patch 103)
Thu Jul 8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-2
- add machinery for regenerating the "configure" script in the face of
    mismatching autoconf versions (patch 300)
Tue Jul 6 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-1
- 2.7 final; drop alphatag
- drop patch 117 (upstream), patch 120 (upstreamed)
- fix the commented-out __python_ver from 26 to 27
2010-07-21 20:48:17 +00:00

25 lines
936 B
Diff

diff -up Python-2.7rc1/Python/codecs.c.ascii-tolower Python-2.7rc1/Python/codecs.c
--- Python-2.7rc1/Python/codecs.c.ascii-tolower 2010-05-09 10:46:46.000000000 -0400
+++ Python-2.7rc1/Python/codecs.c 2010-06-06 05:06:15.373100357 -0400
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
return -1;
}
+/* isupper() forced into the ASCII Locale */
+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
+/* tolower() forced into the ASCII Locale */
+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
+
/* Convert a string to a normalized Python string: all characters are
converted to lower case, spaces are replaced with underscores. */
@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st
if (ch == ' ')
ch = '-';
else
- ch = tolower(Py_CHARMASK(ch));
+ ch = ascii_tolower(Py_CHARMASK(ch));
p[i] = ch;
}
return v;