summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorJordon Xu <46997731+qigangxu@users.noreply.github.com>2019-09-11 00:04:08 +0800
committerSteve Dower <steve.dower@python.org>2019-09-10 17:04:08 +0100
commit2ec70102066fe5534f1a62e8f496d2005e1697db (patch)
tree1d406e9e646da303521b874bf46acca47c203b67 /Python
parent801f925998cc393260f36f5ac77369fef2373ad1 (diff)
downloadcpython-git-2ec70102066fe5534f1a62e8f496d2005e1697db.tar.gz
bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)
Diffstat (limited to 'Python')
-rw-r--r--Python/dynload_aix.c2
-rw-r--r--Python/getargs.c6
-rw-r--r--Python/mystrtoul.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c
index b3ff8e288c..684f10a8b9 100644
--- a/Python/dynload_aix.c
+++ b/Python/dynload_aix.c
@@ -140,7 +140,7 @@ aix_loaderror(const char *pathname)
if (nerr == load_errtab[j].errNo && load_errtab[j].errstr)
ERRBUF_APPEND(load_errtab[j].errstr);
}
- while (Py_ISDIGIT(Py_CHARMASK(*message[i]))) message[i]++ ;
+ while (Py_ISDIGIT(*message[i])) message[i]++ ;
ERRBUF_APPEND(message[i]);
ERRBUF_APPEND("\n");
}
diff --git a/Python/getargs.c b/Python/getargs.c
index 02a0366ece..7723ae3537 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -312,7 +312,7 @@ vgetargs1_impl(PyObject *compat_args, PyObject *const *stack, Py_ssize_t nargs,
break;
default:
if (level == 0) {
- if (Py_ISALPHA(Py_CHARMASK(c)))
+ if (Py_ISALPHA(c))
if (c != 'e') /* skip encoded */
max++;
}
@@ -397,7 +397,7 @@ vgetargs1_impl(PyObject *compat_args, PyObject *const *stack, Py_ssize_t nargs,
}
}
- if (*format != '\0' && !Py_ISALPHA(Py_CHARMASK(*format)) &&
+ if (*format != '\0' && !Py_ISALPHA(*format) &&
*format != '(' &&
*format != '|' && *format != ':' && *format != ';') {
PyErr_Format(PyExc_SystemError,
@@ -521,7 +521,7 @@ converttuple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
}
else if (c == ':' || c == ';' || c == '\0')
break;
- else if (level == 0 && Py_ISALPHA(Py_CHARMASK(c)))
+ else if (level == 0 && Py_ISALPHA(c))
n++;
}
diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c
index 7ab5814272..19fa57aa14 100644
--- a/Python/mystrtoul.c
+++ b/Python/mystrtoul.c
@@ -99,7 +99,7 @@ PyOS_strtoul(const char *str, char **ptr, int base)
int ovlimit; /* required digits to overflow */
/* skip leading white space */
- while (*str && Py_ISSPACE(Py_CHARMASK(*str)))
+ while (*str && Py_ISSPACE(*str))
++str;
/* check for leading 0b, 0o or 0x for auto-base or base 16 */
@@ -138,7 +138,7 @@ PyOS_strtoul(const char *str, char **ptr, int base)
/* skip all zeroes... */
while (*str == '0')
++str;
- while (Py_ISSPACE(Py_CHARMASK(*str)))
+ while (Py_ISSPACE(*str))
++str;
if (ptr)
*ptr = (char *)str;
@@ -266,7 +266,7 @@ PyOS_strtol(const char *str, char **ptr, int base)
unsigned long uresult;
char sign;
- while (*str && Py_ISSPACE(Py_CHARMASK(*str)))
+ while (*str && Py_ISSPACE(*str))
str++;
sign = *str;