diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-31 15:27:00 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-31 15:27:00 (GMT) |
commit | ba3a16c6c3d3da0903873e9464dbc540eaeda1f7 (patch) | |
tree | 6094d419dcf56dfdb9bdb50da0a15d0c0160573a /Modules/cryptmodule.c | |
parent | 50905b557b2a46d4db432b7a9e61fe32afa557e3 (diff) | |
download | cpython-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/cryptmodule.c')
-rw-r--r-- | Modules/cryptmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c index 1e66039..b1c8f5e 100644 --- a/Modules/cryptmodule.c +++ b/Modules/cryptmodule.c @@ -14,7 +14,7 @@ static PyObject *crypt_crypt(PyObject *self, PyObject *args) char *word, *salt; extern char * crypt(const char *, const char *); - if (!PyArg_Parse(args, "(ss)", &word, &salt)) { + if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) { return NULL; } return PyString_FromString( crypt( word, salt ) ); @@ -31,7 +31,7 @@ the same alphabet as the salt."; static PyMethodDef crypt_methods[] = { - {"crypt", crypt_crypt, METH_OLDARGS, crypt_crypt__doc__}, + {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__}, {NULL, NULL} /* sentinel */ }; |