diff Modules/_struct.c @ 82111:c08bcf5302ec 3.3

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).
author Antoine Pitrou <solipsis@pitrou.net>
date Sat, 09 Feb 2013 23:14:42 +0100
parents 70d5906e0461 38830281d43b
children 4d62a62ba44d 10e59553a8de
line wrap: on
line diff
--- a/Modules/_struct.c	Sat Feb 09 22:38:12 2013 +0200
+++ b/Modules/_struct.c	Sat Feb 09 23:14:42 2013 +0100
@@ -1271,7 +1271,7 @@
     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';
@@ -1336,7 +1336,7 @@
     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';