diff options
author | Jordon Xu <46997731+qigangxu@users.noreply.github.com> | 2019-09-10 16:04:08 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@python.org> | 2019-09-10 16:04:08 (GMT) |
commit | 2ec70102066fe5534f1a62e8f496d2005e1697db (patch) | |
tree | 1d406e9e646da303521b874bf46acca47c203b67 /Python/getargs.c | |
parent | 801f925998cc393260f36f5ac77369fef2373ad1 (diff) | |
download | cpython-2ec70102066fe5534f1a62e8f496d2005e1697db.zip cpython-2ec70102066fe5534f1a62e8f496d2005e1697db.tar.gz cpython-2ec70102066fe5534f1a62e8f496d2005e1697db.tar.bz2 |
bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 02a0366..7723ae3 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++; } |