From 21b9867735adc2e6797bef46fb70cff080b07bb1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 29 May 2006 21:58:42 +0000 Subject: Convert more modules to METH_VARARGS. --- Python/marshal.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Python') diff --git a/Python/marshal.c b/Python/marshal.c index c5d5b72f7d..10a6c0c1d7 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -1073,12 +1073,10 @@ marshal_dump(PyObject *self, PyObject *args) } static PyObject * -marshal_load(PyObject *self, PyObject *args) +marshal_load(PyObject *self, PyObject *f) { RFILE rf; - PyObject *f, *result; - if (!PyArg_ParseTuple(args, "O:load", &f)) - return NULL; + PyObject *result; if (!PyFile_Check(f)) { PyErr_SetString(PyExc_TypeError, "marshal.load() arg must be file"); @@ -1121,7 +1119,7 @@ marshal_loads(PyObject *self, PyObject *args) static PyMethodDef marshal_methods[] = { {"dump", marshal_dump, METH_VARARGS}, - {"load", marshal_load, METH_VARARGS}, + {"load", marshal_load, METH_O}, {"dumps", marshal_dumps, METH_VARARGS}, {"loads", marshal_loads, METH_VARARGS}, {NULL, NULL} /* sentinel */ -- cgit v1.2.1