]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use Py_CHARMASK for ctype macros. Fixes bug #232787.
authorMoshe Zadka <moshez@math.huji.ac.il>
Sat, 31 Mar 2001 07:33:56 +0000 (07:33 +0000)
committerMoshe Zadka <moshez@math.huji.ac.il>
Sat, 31 Mar 2001 07:33:56 +0000 (07:33 +0000)
Misc/NEWS
Modules/timemodule.c
Objects/intobject.c
Python/errors.c

index 46cb28a46931aa885fb9c6c5d116000026b1f4d5..5968689ddd26e71cc4a8addc43047f12752d0b68 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,8 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=<id>&group_id=5470&atid
 
 - Patch #103636: Allow writing strings containing null bytes to an SSL socket
 
+- #232787 -- Modules/timemodule.c, Python/errors.c, Objects/intobject.c
+
 What's New in Python 2.0?
 =========================
 
index 116b377e8ef7459d770f1927f029ff6e5a16c7b6..39a7fb98d5a748fb9e3eb9dd831fd8da866d8d0f 100644 (file)
@@ -382,7 +382,7 @@ time_strptime(PyObject *self, PyObject *args)
                PyErr_SetString(PyExc_ValueError, "format mismatch");
                return NULL;
        }
-       while (*s && isspace(*s))
+       while (*s && isspace(Py_CHARMASK(*s)))
                s++;
        if (*s) {
                PyErr_Format(PyExc_ValueError,
index c9d1f6aeaf7ab736e89e053b8dd817d73b160363..829b0106379079bd3c19fc15f2fd131610400af3 100644 (file)
@@ -182,7 +182,7 @@ PyInt_FromString(char *s, char **pend, int base)
                x = (long) PyOS_strtoul(s, &end, base);
        else
                x = PyOS_strtol(s, &end, base);
-       if (end == s || !isalnum(end[-1]))
+       if (end == s || !isalnum(Py_CHARMASK(end[-1])))
                goto bad;
        while (*end && isspace(Py_CHARMASK(*end)))
                end++;
index 28dfbbe3f3acff3bc76f4eedf8f80780173e15f6..1d30dac20140411e22366260325110eeff74b49f 100644 (file)
@@ -402,7 +402,7 @@ PyErr_Format(PyObject *exception, const char *format, ...)
        for (f = format; *f; f++) {
                if (*f == '%') {
                        const char* p = f;
-                       while (*++f && *f != '%' && !isalpha(*f))
+                       while (*++f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
                                ;
                        switch (*f) {
                        case 'c':
@@ -457,15 +457,15 @@ PyErr_Format(PyObject *exception, const char *format, ...)
                        /* parse the width.precision part (we're only
                           interested in the precision value, if any) */
                        n = 0;
-                       while (isdigit(*f))
+                       while (isdigit(Py_CHARMASK(*f)))
                                n = (n*10) + *f++ - '0';
                        if (*f == '.') {
                                f++;
                                n = 0;
-                               while (isdigit(*f))
+                               while (isdigit(Py_CHARMASK(*f)))
                                        n = (n*10) + *f++ - '0';
                        }
-                       while (*f && *f != '%' && !isalpha(*f))
+                       while (*f && *f != '%' && !isalpha(Py_CHARMASK(*f)))
                                f++;
                        switch (*f) {
                        case 'c':