mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +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).
This commit is contained in:
parent
b6ed17344b
commit
4de7457009
11 changed files with 19 additions and 17 deletions
|
@ -99,7 +99,7 @@ PyOS_strtoul(register char *str, char **ptr, int base)
|
|||
register int ovlimit; /* required digits to overflow */
|
||||
|
||||
/* skip leading white space */
|
||||
while (*str && isspace(Py_CHARMASK(*str)))
|
||||
while (*str && Py_ISSPACE(Py_CHARMASK(*str)))
|
||||
++str;
|
||||
|
||||
/* check for leading 0b, 0o or 0x for auto-base or base 16 */
|
||||
|
@ -138,7 +138,7 @@ PyOS_strtoul(register char *str, char **ptr, int base)
|
|||
/* skip all zeroes... */
|
||||
while (*str == '0')
|
||||
++str;
|
||||
while (isspace(Py_CHARMASK(*str)))
|
||||
while (Py_ISSPACE(Py_CHARMASK(*str)))
|
||||
++str;
|
||||
if (ptr)
|
||||
*ptr = str;
|
||||
|
@ -266,7 +266,7 @@ PyOS_strtol(char *str, char **ptr, int base)
|
|||
unsigned long uresult;
|
||||
char sign;
|
||||
|
||||
while (*str && isspace(Py_CHARMASK(*str)))
|
||||
while (*str && Py_ISSPACE(Py_CHARMASK(*str)))
|
||||
str++;
|
||||
|
||||
sign = *str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue