Changeset 391 for python/trunk/Modules/cryptmodule.c
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Modules/cryptmodule.c
r2 r391 15 15 static PyObject *crypt_crypt(PyObject *self, PyObject *args) 16 16 { 17 char *word, *salt; 17 char *word, *salt; 18 18 #ifndef __VMS 19 19 extern char * crypt(const char *, const char *); 20 20 #endif 21 21 22 23 24 25 26 27 22 if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) { 23 return NULL; 24 } 25 /* On some platforms (AtheOS) crypt returns NULL for an invalid 26 salt. Return None in that case. XXX Maybe raise an exception? */ 27 return Py_BuildValue("s", crypt(word, salt)); 28 28 29 29 } … … 39 39 40 40 static PyMethodDef crypt_methods[] = { 41 {"crypt",crypt_crypt, METH_VARARGS, crypt_crypt__doc__},42 {NULL, NULL}/* sentinel */41 {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__}, 42 {NULL, NULL} /* sentinel */ 43 43 }; 44 44 … … 46 46 initcrypt(void) 47 47 { 48 48 Py_InitModule("crypt", crypt_methods); 49 49 }
Note:
See TracChangeset
for help on using the changeset viewer.