Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 16997:86fd723f2928 legacy-trunk
Use Py_CHARMASK for ctype macros. Fixes bug #232787.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 06 Mar 2001 12:12:02 +0000 |
| parents | 2d4da6cfee61 |
| children | 3fc06c1149a4 6a2e2548e6cf |
line wrap: on
line diff
--- a/Python/errors.c Tue Mar 06 12:10:20 2001 +0000 +++ b/Python/errors.c Tue Mar 06 12:12:02 2001 +0000 @@ -402,7 +402,7 @@ 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 @@ /* 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':
