Mercurial > cpython-lru_cache-weakref
diff Modules/structmodule.c @ 11882:dc65c5f6ad7c legacy-trunk
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 29 Feb 2000 13:59:29 +0000 |
| parents | 38023a425e48 |
| children | b1b260a2de98 |
line wrap: on
line diff
--- a/Modules/structmodule.c Tue Feb 29 13:31:16 2000 +0000 +++ b/Modules/structmodule.c Tue Feb 29 13:59:29 2000 +0000 @@ -1097,7 +1097,7 @@ const formatdef *f; int size; - if (!PyArg_ParseTuple(args, "s", &fmt)) + if (!PyArg_ParseTuple(args, "s:calcsize", &fmt)) return NULL; f = whichtable(&fmt); size = calcsize(fmt, f); @@ -1262,7 +1262,7 @@ int len, size, num; PyObject *res, *v; - if (!PyArg_ParseTuple(args, "ss#", &fmt, &start, &len)) + if (!PyArg_ParseTuple(args, "ss#:unpack", &fmt, &start, &len)) return NULL; f = whichtable(&fmt); size = calcsize(fmt, f);
