summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-03-06 12:12:02 +0000
committerMartin v. Löwis <martin@v.loewis.de>2001-03-06 12:12:02 +0000
commit8cdea344b6c59754ef7bc1bead1b74869fa00e95 (patch)
treed8e47f6546d51afd6c115781ded621c179a19d35 /Python/errors.c
parent5c06109e25da8d666ab2dfdb94d6a3bd911f464a (diff)
downloadcpython-8cdea344b6c59754ef7bc1bead1b74869fa00e95.tar.gz
Use Py_CHARMASK for ctype macros. Fixes bug #232787.
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 7f30f7ee0c..8d02b8e262 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -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':