mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
This commit is contained in:
parent
a9b2b4be26
commit
43713e5a28
37 changed files with 272 additions and 272 deletions
|
|
@ -1097,7 +1097,7 @@ struct_calcsize(self, args)
|
|||
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 @@ struct_unpack(self, args)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue