[Python-checkins] CVS: python/dist/src/Python marshal.c,1.45,1.46
Guido van Rossum
python-dev@python.org
Thu, 30 Mar 2000 19:37:44 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/projects/python/develop/guido/src/Python
Modified Files:
marshal.c
Log Message:
Use modern PyArg_ParseTuple style, with function names.
Index: marshal.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/marshal.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** marshal.c 2000/03/10 23:03:02 1.45
--- marshal.c 2000/03/31 00:37:41 1.46
***************
*** 714,718 ****
PyObject *x;
PyObject *f;
! if (!PyArg_Parse(args, "(OO)", &x, &f))
return NULL;
if (!PyFile_Check(f)) {
--- 714,718 ----
PyObject *x;
PyObject *f;
! if (!PyArg_ParseTuple(args, "OO:dump", &x, &f))
return NULL;
if (!PyFile_Check(f)) {
***************
*** 742,746 ****
PyObject *f;
PyObject *v;
! if (!PyArg_Parse(args, "O", &f))
return NULL;
if (!PyFile_Check(f)) {
--- 742,746 ----
PyObject *f;
PyObject *v;
! if (!PyArg_ParseTuple(args, "O:load", &f))
return NULL;
if (!PyFile_Check(f)) {
***************
*** 767,771 ****
{
PyObject *x;
! if (!PyArg_Parse(args, "O", &x))
return NULL;
return PyMarshal_WriteObjectToString(x);
--- 767,771 ----
{
PyObject *x;
! if (!PyArg_ParseTuple(args, "O:dumps", &x))
return NULL;
return PyMarshal_WriteObjectToString(x);
***************
*** 781,785 ****
char *s;
int n;
! if (!PyArg_Parse(args, "s#", &s, &n))
return NULL;
rf.fp = NULL;
--- 781,785 ----
char *s;
int n;
! if (!PyArg_ParseTuple(args, "s#:loads", &s, &n))
return NULL;
rf.fp = NULL;
***************
*** 797,804 ****
static PyMethodDef marshal_methods[] = {
! {"dump", marshal_dump},
! {"load", marshal_load},
! {"dumps", marshal_dumps},
! {"loads", marshal_loads},
{NULL, NULL} /* sentinel */
};
--- 797,804 ----
static PyMethodDef marshal_methods[] = {
! {"dump", marshal_dump, 1},
! {"load", marshal_load, 1},
! {"dumps", marshal_dumps, 1},
! {"loads", marshal_loads, 1},
{NULL, NULL} /* sentinel */
};