Mercurial > cpython-lru_cache-weakref
diff Modules/cryptmodule.c @ 22709:3aa4bf7ac31e legacy-trunk
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.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 31 Mar 2002 15:27:00 +0000 |
| parents | 8bd82cf361aa |
| children | bec1b942e0bc |
line wrap: on
line diff
--- a/Modules/cryptmodule.c Sun Mar 31 14:57:24 2002 +0000 +++ b/Modules/cryptmodule.c Sun Mar 31 15:27:00 2002 +0000 @@ -14,7 +14,7 @@ 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 @@ static PyMethodDef crypt_methods[] = { - {"crypt", crypt_crypt, METH_OLDARGS, crypt_crypt__doc__}, + {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__}, {NULL, NULL} /* sentinel */ };
