summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
-rw-r--r--Python/dynload_aix.c2
-rw-r--r--Python/getargs.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/Python/ast.c b/Python/ast.c
index dde0d04..93334dc 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2879,7 +2879,7 @@ static PyObject *
parsestr(const char *s, const char *encoding)
{
size_t len;
- int quote = *s;
+ int quote = Py_CHARMASK(*s);
int rawmode = 0;
int need_encoding;
int unicode = 0;
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c
index 03ecc07..7a604f2 100644
--- a/Python/dynload_aix.c
+++ b/Python/dynload_aix.c
@@ -144,7 +144,7 @@ aix_loaderror(const char *pathname)
if (nerr == load_errtab[j].errNo && load_errtab[j].errstr)
ERRBUF_APPEND(load_errtab[j].errstr);
}
- while (isdigit(*message[i])) message[i]++ ;
+ while (isdigit(Py_CHARMASK(*message[i]))) message[i]++ ;
ERRBUF_APPEND(message[i]);
ERRBUF_APPEND("\n");
}
diff --git a/Python/getargs.c b/Python/getargs.c
index 16f156f..23b91fd 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -166,7 +166,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int compat)
if (level == 0) {
if (c == 'O')
max++;
- else if (isalpha(c)) {
+ else if (isalpha(Py_CHARMASK(c))) {
if (c != 'e') /* skip encoded */
max++;
} else if (c == '|')
@@ -255,7 +255,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int compat)
}
}
- if (*format != '\0' && !isalpha((int)(*format)) &&
+ if (*format != '\0' && !isalpha(Py_CHARMASK((*format))) &&
*format != '(' &&
*format != '|' && *format != ':' && *format != ';') {
PyErr_Format(PyExc_SystemError,
@@ -347,7 +347,7 @@ converttuple(PyObject *arg, const char **p_format, va_list *p_va, int *levels,
}
else if (c == ':' || c == ';' || c == '\0')
break;
- else if (level == 0 && isalpha(c))
+ else if (level == 0 && isalpha(Py_CHARMASK(c)))
n++;
}
@@ -1223,7 +1223,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
min = -1;
max = 0;
while ((i = *format++) != '\0') {
- if (isalpha(i) && i != 'e') {
+ if (isalpha(Py_CHARMASK(i)) && i != 'e') {
max++;
if (*p == NULL) {
PyErr_SetString(PyExc_RuntimeError,