Get rid of more PyArg_Parse & METH_OLDARGS.

PyArg_Parse( "s" )  -> PyString_AsString
  PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
This commit is contained in:
Neal Norwitz 2002-04-02 18:17:57 +00:00
parent 155db9aa22
commit 187ae56166
2 changed files with 14 additions and 13 deletions

View file

@ -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);