Mercurial > cpython-lru_cache-weakref
diff Modules/cryptmodule.c @ 23777:bec1b942e0bc legacy-trunk
Patch #488073: AtheOS port.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 11 Jun 2002 06:22:31 +0000 |
| parents | 3aa4bf7ac31e |
| children | ed1ba37a46b7 |
line wrap: on
line diff
--- a/Modules/cryptmodule.c Tue Jun 11 04:45:34 2002 +0000 +++ b/Modules/cryptmodule.c Tue Jun 11 06:22:31 2002 +0000 @@ -17,7 +17,9 @@ if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) { return NULL; } - return PyString_FromString( crypt( word, salt ) ); + /* 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)); }
