commit | 187ae561667f82142edbe7beaa612381b6bb0827 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Tue Apr 02 18:17:57 2002 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Tue Apr 02 18:17:57 2002 +0000 |
tree | 1d2e0fba61e51cbbddee5f7370c283ecbf137c3c | |
parent | 155db9aa222e96fcaf2db4d80b414098889a7c5d [diff] [blame] |
Get rid of more PyArg_Parse & METH_OLDARGS. PyArg_Parse( "s" ) -> PyString_AsString PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index df80302..bf871ee 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c
@@ -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);