Mercurial > cpython-lru_cache-weakref
diff Modules/structmodule.c @ 22771:260a1720f629 legacy-trunk
Get rid of more PyArg_Parse & METH_OLDARGS.
PyArg_Parse( "s" ) -> PyString_AsString
PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Tue, 02 Apr 2002 18:17:57 +0000 |
| parents | cbf1dbca1f63 |
| children | ed1ba37a46b7 |
line wrap: on
line diff
--- a/Modules/structmodule.c Tue Apr 02 17:53:47 2002 +0000 +++ b/Modules/structmodule.c Tue Apr 02 18:17:57 2002 +0000 @@ -1273,7 +1273,8 @@ 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);
