]> granicus.if.org Git - python/commitdiff
Add missing Py_CHARMASK when calling isspace().
authorKristján Valur Jónsson <kristjan@ccpgames.com>
Thu, 18 Dec 2008 17:08:57 +0000 (17:08 +0000)
committerKristján Valur Jónsson <kristjan@ccpgames.com>
Thu, 18 Dec 2008 17:08:57 +0000 (17:08 +0000)
Found by enabling runtime tests on windows, by disabling the _set_invalid_parameter_handler() fiddling.

Objects/floatobject.c

index 89eac6466d11508cd0ce37fda2e12f7135811671..20c1eef01468480d41629054b472c56f7af863d6 100644 (file)
@@ -1238,7 +1238,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
         ********************/
 
        /* leading whitespace and optional sign */
-       while (isspace(*s))
+       while (isspace(Py_CHARMASK(*s)))
                s++;
        if (*s == '-') {
                s++;
@@ -1308,7 +1308,7 @@ float_fromhex(PyObject *cls, PyObject *arg)
                exp = 0;
 
        /* optional trailing whitespace leading to the end of the string */
-       while (isspace(*s))
+       while (isspace(Py_CHARMASK(*s)))
                s++;
        if (s != s_end)
                goto parse_error;