diff Python/errors.c @ 17275:e510c4cc5737 2.0

Use Py_CHARMASK for ctype macros. Fixes bug #232787.
author Moshe Zadka <moshez@math.huji.ac.il>
date Sat, 31 Mar 2001 07:33:56 +0000
parents a2fcc487b9da
children
line wrap: on
line diff
--- a/Python/errors.c	Sat Mar 31 07:13:29 2001 +0000
+++ b/Python/errors.c	Sat Mar 31 07:33:56 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':