mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Get rid of more PyArg_Parse & METH_OLDARGS.
PyArg_Parse( "s" ) -> PyString_AsString PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
This commit is contained in:
parent
155db9aa22
commit
187ae56166
2 changed files with 14 additions and 13 deletions
|
|
@ -1273,7 +1273,8 @@ struct_pack(PyObject *self, PyObject *args)
|
|||
return NULL;
|
||||
}
|
||||
format = PyTuple_GetItem(args, 0);
|
||||
if (!PyArg_Parse(format, "s", &fmt))
|
||||
fmt = PyString_AsString(format);
|
||||
if (!fmt)
|
||||
return NULL;
|
||||
f = whichtable(&fmt);
|
||||
size = calcsize(fmt, f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue