mirror of
https://github.com/python/cpython.git
synced 2025-08-16 06:40:56 +00:00
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
(except in the strop module, which is deprecated anyway)
This commit is contained in:
parent
ace2ccf387
commit
44b3b5457a
3 changed files with 6 additions and 6 deletions
|
@ -1105,8 +1105,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue