Fix SF bug #1072182, problems with signed characters.
Most of these can be backported.
diff --git a/Parser/grammar.c b/Parser/grammar.c
index c0613df..d8e3897 100644
--- a/Parser/grammar.c
+++ b/Parser/grammar.c
@@ -180,7 +180,8 @@
}
if (lb->lb_type == STRING) {
- if (isalpha((int)(lb->lb_str[1])) || lb->lb_str[1] == '_') {
+ if (isalpha(Py_CHARMASK(lb->lb_str[1])) ||
+ lb->lb_str[1] == '_') {
char *p;
char *src;
char *dest;
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index a79ea81..3b1d6a6 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -229,7 +229,7 @@
} while (t[0] == '\x20' || t[0] == '\t');
begin = t;
- while (isalnum((int)t[0]) ||
+ while (isalnum(Py_CHARMASK(t[0])) ||
t[0] == '-' || t[0] == '_' || t[0] == '.')
t++;