Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Modules/cryptmodule.c

    r2 r391  
    1515static PyObject *crypt_crypt(PyObject *self, PyObject *args)
    1616{
    17         char *word, *salt;
     17    char *word, *salt;
    1818#ifndef __VMS
    19         extern char * crypt(const char *, const char *);
     19    extern char * crypt(const char *, const char *);
    2020#endif
    2121
    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));
     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));
    2828
    2929}
     
    3939
    4040static 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 */
    4343};
    4444
     
    4646initcrypt(void)
    4747{
    48         Py_InitModule("crypt", crypt_methods);
     48    Py_InitModule("crypt", crypt_methods);
    4949}
Note: See TracChangeset for help on using the changeset viewer.