summaryrefslogtreecommitdiffstats
path: root/Modules/structmodule.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2005-08-26 08:39:56 (GMT)
committerRaymond Hettinger <python@rcn.com>2005-08-26 08:39:56 (GMT)
commitb3f55f4a706113f24386afd4bb1262b44a1c70c0 (patch)
treea52e95855b4bd112fa3b494e4b9de9ae5ea87025 /Modules/structmodule.c
parentd2e3ba7a3595bfa4342ab30b5228d8d94d6c6a08 (diff)
downloadcpython-b3f55f4a706113f24386afd4bb1262b44a1c70c0.zip
cpython-b3f55f4a706113f24386afd4bb1262b44a1c70c0.tar.gz
cpython-b3f55f4a706113f24386afd4bb1262b44a1c70c0.tar.bz2
SF bug #1072182: bad arg type to isspace in struct module
Diffstat (limited to 'Modules/structmodule.c')
-rw-r--r--Modules/structmodule.c6
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';