Mercurial > cpython-lru_cache-weakref
diff Modules/structmodule.c @ 6167:9e432468f756 legacy-trunk
Ignore whitespace between formats (not internal to a count+format).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 26 Aug 1997 20:39:54 +0000 |
| parents | 2c4b802a3b5d |
| children | ab64344e87db |
line wrap: on
line diff
--- a/Modules/structmodule.c Tue Aug 26 19:06:40 1997 +0000 +++ b/Modules/structmodule.c Tue Aug 26 20:39:54 1997 +0000 @@ -38,6 +38,7 @@ #include "mymath.h" #include <limits.h> +#include <ctype.h> /* Exception */ @@ -981,6 +982,8 @@ s = fmt; size = 0; while ((c = *s++) != '\0') { + if (isspace(c)) + continue; if ('0' <= c && c <= '9') { num = c - '0'; while ('0' <= (c = *s++) && c <= '9') { @@ -1075,6 +1078,8 @@ res = restart = PyString_AsString(result); while ((c = *s++) != '\0') { + if (isspace(c)) + continue; if ('0' <= c && c <= '9') { num = c - '0'; while ('0' <= (c = *s++) && c <= '9') @@ -1179,6 +1184,8 @@ str = start; s = fmt; while ((c = *s++) != '\0') { + if (isspace(c)) + continue; if ('0' <= c && c <= '9') { num = c - '0'; while ('0' <= (c = *s++) && c <= '9')
