mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
8ad5b07ccb
9 changed files with 17 additions and 15 deletions
|
@ -1270,7 +1270,7 @@ prepare_s(PyStructObject *self)
|
|||
size = 0;
|
||||
len = 0;
|
||||
while ((c = *s++) != '\0') {
|
||||
if (isspace(Py_CHARMASK(c)))
|
||||
if (Py_ISSPACE(Py_CHARMASK(c)))
|
||||
continue;
|
||||
if ('0' <= c && c <= '9') {
|
||||
num = c - '0';
|
||||
|
@ -1335,7 +1335,7 @@ prepare_s(PyStructObject *self)
|
|||
s = fmt;
|
||||
size = 0;
|
||||
while ((c = *s++) != '\0') {
|
||||
if (isspace(Py_CHARMASK(c)))
|
||||
if (Py_ISSPACE(Py_CHARMASK(c)))
|
||||
continue;
|
||||
if ('0' <= c && c <= '9') {
|
||||
num = c - '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue