diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 15:52:27 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 15:52:27 (GMT) |
commit | f95a1b3c53bdd678b64aa608d4375660033460c3 (patch) | |
tree | a8bee40b1b14e28ff5978ea519f3035a3c399912 /Modules/cryptmodule.c | |
parent | bd250300191133d276a71b395b6428081bf825b8 (diff) | |
download | cpython-f95a1b3c53bdd678b64aa608d4375660033460c3.zip cpython-f95a1b3c53bdd678b64aa608d4375660033460c3.tar.gz cpython-f95a1b3c53bdd678b64aa608d4375660033460c3.tar.bz2 |
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
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); } |