mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
This commit is contained in:
commit
c73c561181
11 changed files with 19 additions and 17 deletions
|
|
@ -2019,7 +2019,7 @@ PyLong_FromString(char *str, char **pend, int base)
|
|||
"int() arg 2 must be >= 2 and <= 36");
|
||||
return NULL;
|
||||
}
|
||||
while (*str != '\0' && isspace(Py_CHARMASK(*str)))
|
||||
while (*str != '\0' && Py_ISSPACE(Py_CHARMASK(*str)))
|
||||
str++;
|
||||
if (*str == '+')
|
||||
++str;
|
||||
|
|
@ -2263,7 +2263,7 @@ digit beyond the first.
|
|||
goto onError;
|
||||
if (sign < 0)
|
||||
Py_SIZE(z) = -(Py_SIZE(z));
|
||||
while (*str && isspace(Py_CHARMASK(*str)))
|
||||
while (*str && Py_ISSPACE(Py_CHARMASK(*str)))
|
||||
str++;
|
||||
if (*str != '\0')
|
||||
goto onError;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue