Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2ec70102
Commit
2ec70102
authored
Sep 11, 2019
by
Jordon Xu
Committed by
Steve Dower
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)
parent
801f9259
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
Modules/_struct.c
Modules/_struct.c
+2
-2
Modules/_tkinter.c
Modules/_tkinter.c
+2
-2
Modules/unicodedata.c
Modules/unicodedata.c
+2
-2
Objects/longobject.c
Objects/longobject.c
+2
-2
Python/dynload_aix.c
Python/dynload_aix.c
+1
-1
Python/getargs.c
Python/getargs.c
+3
-3
Python/mystrtoul.c
Python/mystrtoul.c
+3
-3
No files found.
Modules/_struct.c
View file @
2ec70102
...
...
@@ -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'
;
...
...
Modules/_tkinter.c
View file @
2ec70102
...
...
@@ -671,8 +671,8 @@ Tkapp_New(const char *screenName, const char *className,
}
strcpy
(
argv0
,
className
);
if
(
Py_ISUPPER
(
Py_CHARMASK
(
argv0
[
0
])
))
argv0
[
0
]
=
Py_TOLOWER
(
Py_CHARMASK
(
argv0
[
0
])
);
if
(
Py_ISUPPER
(
argv0
[
0
]
))
argv0
[
0
]
=
Py_TOLOWER
(
argv0
[
0
]
);
Tcl_SetVar
(
v
->
interp
,
"argv0"
,
argv0
,
TCL_GLOBAL_ONLY
);
PyMem_Free
(
argv0
);
...
...
Modules/unicodedata.c
View file @
2ec70102
...
...
@@ -987,7 +987,7 @@ _gethash(const char *s, int len, int scale)
unsigned
long
h
=
0
;
unsigned
long
ix
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
h
=
(
h
*
scale
)
+
(
unsigned
char
)
Py_TOUPPER
(
Py_CHARMASK
(
s
[
i
])
);
h
=
(
h
*
scale
)
+
(
unsigned
char
)
Py_TOUPPER
(
s
[
i
]
);
ix
=
h
&
0xff000000
;
if
(
ix
)
h
=
(
h
^
((
ix
>>
24
)
&
0xff
))
&
0x00ffffff
;
...
...
@@ -1157,7 +1157,7 @@ _cmpname(PyObject *self, int code, const char* name, int namelen)
if
(
!
_getucname
(
self
,
code
,
buffer
,
NAME_MAXLEN
,
1
))
return
0
;
for
(
i
=
0
;
i
<
namelen
;
i
++
)
{
if
(
Py_TOUPPER
(
Py_CHARMASK
(
name
[
i
])
)
!=
buffer
[
i
])
if
(
Py_TOUPPER
(
name
[
i
]
)
!=
buffer
[
i
])
return
0
;
}
return
buffer
[
namelen
]
==
'\0'
;
...
...
Objects/longobject.c
View file @
2ec70102
...
...
@@ -2300,7 +2300,7 @@ PyLong_FromString(const char *str, char **pend, int base)
"int() arg 2 must be >= 2 and <= 36"
);
return
NULL
;
}
while
(
*
str
!=
'\0'
&&
Py_ISSPACE
(
Py_CHARMASK
(
*
str
)
))
{
while
(
*
str
!=
'\0'
&&
Py_ISSPACE
(
*
str
))
{
str
++
;
}
if
(
*
str
==
'+'
)
{
...
...
@@ -2609,7 +2609,7 @@ digit beyond the first.
if
(
sign
<
0
)
{
Py_SIZE
(
z
)
=
-
(
Py_SIZE
(
z
));
}
while
(
*
str
&&
Py_ISSPACE
(
Py_CHARMASK
(
*
str
)
))
{
while
(
*
str
&&
Py_ISSPACE
(
*
str
))
{
str
++
;
}
if
(
*
str
!=
'\0'
)
{
...
...
Python/dynload_aix.c
View file @
2ec70102
...
...
@@ -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
"
);
}
...
...
Python/getargs.c
View file @
2ec70102
...
...
@@ -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
++
;
}
...
...
Python/mystrtoul.c
View file @
2ec70102
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment