summaryrefslogtreecommitdiffstats
path: root/Modules/structmodule.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-04-02 18:17:57 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-04-02 18:17:57 (GMT)
commit187ae561667f82142edbe7beaa612381b6bb0827 (patch)
tree1d2e0fba61e51cbbddee5f7370c283ecbf137c3c /Modules/structmodule.c
parent155db9aa222e96fcaf2db4d80b414098889a7c5d (diff)
downloadcpython-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.c3
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);