diff options
Diffstat (limited to 'Modules/cryptmodule.c')
-rw-r--r-- | Modules/cryptmodule.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c index d3d9271..d5a42ff 100644 --- a/Modules/cryptmodule.c +++ b/Modules/cryptmodule.c @@ -14,17 +14,17 @@ static PyObject *crypt_crypt(PyObject *self, PyObject *args) { - char *word, *salt; + char *word, *salt; #ifndef __VMS - extern char * crypt(const char *, const char *); + extern char * crypt(const char *, const char *); #endif - if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) { - return NULL; - } - /* On some platforms (AtheOS) crypt returns NULL for an invalid - salt. Return None in that case. XXX Maybe raise an exception? */ - return Py_BuildValue("s", crypt(word, salt)); + if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) { + return NULL; + } + /* On some platforms (AtheOS) crypt returns NULL for an invalid + salt. Return None in that case. XXX Maybe raise an exception? */ + return Py_BuildValue("s", crypt(word, salt)); } @@ -38,25 +38,25 @@ the same alphabet as the salt."); static PyMethodDef crypt_methods[] = { - {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__}, - {NULL, NULL} /* sentinel */ + {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__}, + {NULL, NULL} /* sentinel */ }; static struct PyModuleDef cryptmodule = { - PyModuleDef_HEAD_INIT, - "crypt", - NULL, - -1, - crypt_methods, - NULL, - NULL, - NULL, - NULL + PyModuleDef_HEAD_INIT, + "crypt", + NULL, + -1, + crypt_methods, + NULL, + NULL, + NULL, + NULL }; PyMODINIT_FUNC PyInit_crypt(void) { - return PyModule_Create(&cryptmodule); + return PyModule_Create(&cryptmodule); } |