From b3f55f4a706113f24386afd4bb1262b44a1c70c0 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 26 Aug 2005 08:39:56 +0000 Subject: SF bug #1072182: bad arg type to isspace in struct module --- Modules/structmodule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 33134e920b..137b8988e0 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'; -- cgit v1.2.1