summaryrefslogtreecommitdiffstats
path: root/Modules/binascii.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-04 11:50:21 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-04 11:50:21 (GMT)
commited8ba14441d5a9c97c0cb8ba9e262595cf94dd1a (patch)
tree33554088a47269264ebb1b57146152e7ed10c29b /Modules/binascii.c
parent1665d2c75fcfe5097983c13fdf66fd5e766890c2 (diff)
downloadcpython-ed8ba14441d5a9c97c0cb8ba9e262595cf94dd1a.zip
cpython-ed8ba14441d5a9c97c0cb8ba9e262595cf94dd1a.tar.gz
cpython-ed8ba14441d5a9c97c0cb8ba9e262595cf94dd1a.tar.bz2
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r--Modules/binascii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c
index 01e8860..19681b4 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -1102,8 +1102,8 @@ to_int(int c)
if (isdigit(c))
return c - '0';
else {
- if (isupper(c))
- c = tolower(c);
+ if (Py_ISUPPER(c))
+ c = Py_TOLOWER(c);
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
}