summaryrefslogtreecommitdiffstats
path: root/Modules/rgbimgmodule.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-03-31 15:27:00 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-03-31 15:27:00 (GMT)
commitba3a16c6c3d3da0903873e9464dbc540eaeda1f7 (patch)
tree6094d419dcf56dfdb9bdb50da0a15d0c0160573a /Modules/rgbimgmodule.c
parent50905b557b2a46d4db432b7a9e61fe32afa557e3 (diff)
downloadcpython-ba3a16c6c3d3da0903873e9464dbc540eaeda1f7.zip
cpython-ba3a16c6c3d3da0903873e9464dbc540eaeda1f7.tar.gz
cpython-ba3a16c6c3d3da0903873e9464dbc540eaeda1f7.tar.bz2
Remove METH_OLDARGS:
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple Convert METH_OLDARGS -> METH_NOARGS: remove args parameter Please review. All tests pass, but some modules don't have tests. I spot checked various functions to try to make sure nothing broke.
Diffstat (limited to 'Modules/rgbimgmodule.c')
-rw-r--r--Modules/rgbimgmodule.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c
index 828577f..596ea4f 100644
--- a/Modules/rgbimgmodule.c
+++ b/Modules/rgbimgmodule.c
@@ -236,7 +236,7 @@ sizeofimage(PyObject *self, PyObject *args)
IMAGE image;
FILE *inf;
- if (!PyArg_Parse(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:sizeofimage", &name))
return NULL;
inf = fopen(name, "rb");
@@ -275,7 +275,7 @@ longimagedata(PyObject *self, PyObject *args)
int rlebuflen;
PyObject *rv = NULL;
- if (!PyArg_Parse(args, "s", &name))
+ if (!PyArg_ParseTuple(args, "s:longimagedata", &name))
return NULL;
inf = fopen(name,"rb");
@@ -570,8 +570,8 @@ longstoimage(PyObject *self, PyObject *args)
int rlebuflen, goodwrite;
PyObject *retval = NULL;
- if (!PyArg_Parse(args, "(s#iiis)", &lptr, &len, &xsize, &ysize, &zsize,
- &name))
+ if (!PyArg_ParseTuple(args, "s#iiis:longstoimage", &lptr, &len,
+ &xsize, &ysize, &zsize, &name))
return NULL;
goodwrite = 1;
@@ -734,7 +734,7 @@ ttob(PyObject *self, PyObject *args)
{
int order, oldorder;
- if (!PyArg_Parse(args, "i", &order))
+ if (!PyArg_ParseTuple(args, "i:ttob", &order))
return NULL;
oldorder = reverse_order;
reverse_order = order;
@@ -743,10 +743,10 @@ ttob(PyObject *self, PyObject *args)
static PyMethodDef
rgbimg_methods[] = {
- {"sizeofimage", sizeofimage, METH_OLDARGS},
- {"longimagedata", longimagedata, METH_OLDARGS},
- {"longstoimage", longstoimage, METH_OLDARGS},
- {"ttob", ttob, METH_OLDARGS},
+ {"sizeofimage", sizeofimage, METH_VARARGS},
+ {"longimagedata", longimagedata, METH_VARARGS},
+ {"longstoimage", longstoimage, METH_VARARGS},
+ {"ttob", ttob, METH_VARARGS},
{NULL, NULL} /* sentinel */
};