diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-02-09 22:16:51 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-02-09 22:16:51 (GMT) |
commit | 8ad5b07ccb81f51551ac087a5409ebc85c0d16a7 (patch) | |
tree | 0496567aa3d6d37dc456da69e9b32f7da561f102 /Modules | |
parent | 151699a202e6213c1f02b37605a033975ae52307 (diff) | |
parent | c73c561181c3ea3bf15c908a827878e1450a5ac6 (diff) | |
download | cpython-8ad5b07ccb81f51551ac087a5409ebc85c0d16a7.zip cpython-8ad5b07ccb81f51551ac087a5409ebc85c0d16a7.tar.gz cpython-8ad5b07ccb81f51551ac087a5409ebc85c0d16a7.tar.bz2 |
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).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_struct.c | 4 | ||||
-rw-r--r-- | Modules/binascii.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index 6e8759b..208559c 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -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'; diff --git a/Modules/binascii.c b/Modules/binascii.c index ad5e1b1..340ec9c 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -1135,7 +1135,7 @@ This function is also available as \"hexlify()\"."); static int to_int(int c) { - if (isdigit(c)) + if (Py_ISDIGIT(c)) return c - '0'; else { if (Py_ISUPPER(c)) |