diff options
author | Guido van Rossum <guido@python.org> | 2000-03-31 00:37:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-31 00:37:41 (GMT) |
commit | 2efa369861d49e79b4a2ea679197aa969dafa510 (patch) | |
tree | 8d5f542c20e2cb6805013133797b8065c24e8ac5 /Python/marshal.c | |
parent | 6a973c711823f64d0362d0ba4b25ead4162df357 (diff) | |
download | cpython-2efa369861d49e79b4a2ea679197aa969dafa510.zip cpython-2efa369861d49e79b4a2ea679197aa969dafa510.tar.gz cpython-2efa369861d49e79b4a2ea679197aa969dafa510.tar.bz2 |
Use modern PyArg_ParseTuple style, with function names.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 519081d..05ac6e9 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -713,7 +713,7 @@ marshal_dump(self, args) WFILE wf; PyObject *x; PyObject *f; - if (!PyArg_Parse(args, "(OO)", &x, &f)) + if (!PyArg_ParseTuple(args, "OO:dump", &x, &f)) return NULL; if (!PyFile_Check(f)) { PyErr_SetString(PyExc_TypeError, @@ -741,7 +741,7 @@ marshal_load(self, args) RFILE rf; PyObject *f; PyObject *v; - if (!PyArg_Parse(args, "O", &f)) + if (!PyArg_ParseTuple(args, "O:load", &f)) return NULL; if (!PyFile_Check(f)) { PyErr_SetString(PyExc_TypeError, @@ -766,7 +766,7 @@ marshal_dumps(self, args) PyObject *args; { PyObject *x; - if (!PyArg_Parse(args, "O", &x)) + if (!PyArg_ParseTuple(args, "O:dumps", &x)) return NULL; return PyMarshal_WriteObjectToString(x); } @@ -780,7 +780,7 @@ marshal_loads(self, args) PyObject *v; char *s; int n; - if (!PyArg_Parse(args, "s#", &s, &n)) + if (!PyArg_ParseTuple(args, "s#:loads", &s, &n)) return NULL; rf.fp = NULL; rf.str = args; @@ -796,10 +796,10 @@ marshal_loads(self, args) } static PyMethodDef marshal_methods[] = { - {"dump", marshal_dump}, - {"load", marshal_load}, - {"dumps", marshal_dumps}, - {"loads", marshal_loads}, + {"dump", marshal_dump, 1}, + {"load", marshal_load, 1}, + {"dumps", marshal_dumps, 1}, + {"loads", marshal_loads, 1}, {NULL, NULL} /* sentinel */ }; |