diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-04-02 18:17:57 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-04-02 18:17:57 (GMT) |
commit | 187ae561667f82142edbe7beaa612381b6bb0827 (patch) | |
tree | 1d2e0fba61e51cbbddee5f7370c283ecbf137c3c /Modules/structmodule.c | |
parent | 155db9aa222e96fcaf2db4d80b414098889a7c5d (diff) | |
download | cpython-187ae561667f82142edbe7beaa612381b6bb0827.zip cpython-187ae561667f82142edbe7beaa612381b6bb0827.tar.gz cpython-187ae561667f82142edbe7beaa612381b6bb0827.tar.bz2 |
Get rid of more PyArg_Parse & METH_OLDARGS.
PyArg_Parse( "s" ) -> PyString_AsString
PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
Diffstat (limited to 'Modules/structmodule.c')
-rw-r--r-- | Modules/structmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ 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); |