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,
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++;
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':
/* 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':