summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
authorJordon Xu <46997731+qigangxu@users.noreply.github.com>2019-09-10 16:04:08 (GMT)
committerSteve Dower <steve.dower@python.org>2019-09-10 16:04:08 (GMT)
commit2ec70102066fe5534f1a62e8f496d2005e1697db (patch)
tree1d406e9e646da303521b874bf46acca47c203b67 /Modules/_struct.c
parent801f925998cc393260f36f5ac77369fef2373ad1 (diff)
downloadcpython-2ec70102066fe5534f1a62e8f496d2005e1697db.zip
cpython-2ec70102066fe5534f1a62e8f496d2005e1697db.tar.gz
cpython-2ec70102066fe5534f1a62e8f496d2005e1697db.tar.bz2
bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 5fdfdf9..c387ae2 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1298,7 +1298,7 @@ prepare_s(PyStructObject *self)
len = 0;
ncodes = 0;
while ((c = *s++) != '\0') {
- if (Py_ISSPACE(Py_CHARMASK(c)))
+ if (Py_ISSPACE(c))
continue;
if ('0' <= c && c <= '9') {
num = c - '0';
@@ -1363,7 +1363,7 @@ prepare_s(PyStructObject *self)
s = fmt;
size = 0;
while ((c = *s++) != '\0') {
- if (Py_ISSPACE(Py_CHARMASK(c)))
+ if (Py_ISSPACE(c))
continue;
if ('0' <= c && c <= '9') {
num = c - '0';