Kaydet (Commit) b3f55f4a authored tarafından Raymond Hettinger's avatar Raymond Hettinger

SF bug #1072182: bad arg type to isspace in struct module

üst d2e3ba7a
...@@ -959,7 +959,7 @@ calcsize(const char *fmt, const formatdef *f) ...@@ -959,7 +959,7 @@ calcsize(const char *fmt, const formatdef *f)
s = fmt; s = fmt;
size = 0; size = 0;
while ((c = *s++) != '\0') { while ((c = *s++) != '\0') {
if (isspace((int)c)) if (isspace(Py_CHARMASK(c)))
continue; continue;
if ('0' <= c && c <= '9') { if ('0' <= c && c <= '9') {
num = c - '0'; num = c - '0';
...@@ -1059,7 +1059,7 @@ struct_pack(PyObject *self, PyObject *args) ...@@ -1059,7 +1059,7 @@ struct_pack(PyObject *self, PyObject *args)
res = restart = PyString_AsString(result); res = restart = PyString_AsString(result);
while ((c = *s++) != '\0') { while ((c = *s++) != '\0') {
if (isspace((int)c)) if (isspace(Py_CHARMASK(c)))
continue; continue;
if ('0' <= c && c <= '9') { if ('0' <= c && c <= '9') {
num = c - '0'; num = c - '0';
...@@ -1191,7 +1191,7 @@ struct_unpack(PyObject *self, PyObject *args) ...@@ -1191,7 +1191,7 @@ struct_unpack(PyObject *self, PyObject *args)
str = start; str = start;
s = fmt; s = fmt;
while ((c = *s++) != '\0') { while ((c = *s++) != '\0') {
if (isspace((int)c)) if (isspace(Py_CHARMASK(c)))
continue; continue;
if ('0' <= c && c <= '9') { if ('0' <= c && c <= '9') {
num = c - '0'; num = c - '0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment