diff options
author | Raymond Hettinger <python@rcn.com> | 2005-08-26 08:42:13 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-08-26 08:42:13 (GMT) |
commit | 0acd7e05813a37d57c22f9e8a12c194c653678e1 (patch) | |
tree | fc9313e83bae5ece6615787859aa5f45975acce6 | |
parent | 32c2ed59f3b9a6912b4f16d989d0914422db0a48 (diff) | |
download | cpython-0acd7e05813a37d57c22f9e8a12c194c653678e1.zip cpython-0acd7e05813a37d57c22f9e8a12c194c653678e1.tar.gz cpython-0acd7e05813a37d57c22f9e8a12c194c653678e1.tar.bz2 |
SF bug #1072182: bad arg type to isspace in struct module
-rw-r--r-- | Modules/structmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 33134e9..137b898 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -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'; |