mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
SF bug #1072182: bad arg type to isspace in struct module
This commit is contained in:
parent
d2e3ba7a35
commit
b3f55f4a70
1 changed files with 3 additions and 3 deletions
|
@ -959,7 +959,7 @@ calcsize(const char *fmt, const formatdef *f)
|
|||
s = fmt;
|
||||
size = 0;
|
||||
while ((c = *s++) != '\0') {
|
||||
if (isspace((int)c))
|
||||
if (isspace(Py_CHARMASK(c)))
|
||||
continue;
|
||||
if ('0' <= c && c <= '9') {
|
||||
num = c - '0';
|
||||
|
@ -1059,7 +1059,7 @@ struct_pack(PyObject *self, PyObject *args)
|
|||
res = restart = PyString_AsString(result);
|
||||
|
||||
while ((c = *s++) != '\0') {
|
||||
if (isspace((int)c))
|
||||
if (isspace(Py_CHARMASK(c)))
|
||||
continue;
|
||||
if ('0' <= c && c <= '9') {
|
||||
num = c - '0';
|
||||
|
@ -1191,7 +1191,7 @@ struct_unpack(PyObject *self, PyObject *args)
|
|||
str = start;
|
||||
s = fmt;
|
||||
while ((c = *s++) != '\0') {
|
||||
if (isspace((int)c))
|
||||
if (isspace(Py_CHARMASK(c)))
|
||||
continue;
|
||||
if ('0' <= c && c <= '9') {
|
||||
num = c - '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue