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/Mac/Modules/gestaltmodule.c

    r2 r391  
    55                        All Rights Reserved
    66
    7 Permission to use, copy, modify, and distribute this software and its 
    8 documentation for any purpose and without fee is hereby granted, 
     7Permission to use, copy, modify, and distribute this software and its
     8documentation for any purpose and without fee is hereby granted,
    99provided that the above copyright notice appear in all copies and that
    10 both that copyright notice and this permission notice appear in 
     10both that copyright notice and this permission notice appear in
    1111supporting documentation, and that the names of Stichting Mathematisch
    1212Centrum or CWI not be used in advertising or publicity pertaining to
     
    3333gestalt_gestalt(PyObject *self, PyObject *args)
    3434{
    35         OSErr iErr;
    36         OSType selector;
    37         SInt32 response;
    38         if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
    39                 return NULL;
    40         iErr = Gestalt ( selector, &response );
    41         if (iErr != 0)
    42                 return PyMac_Error(iErr);
    43         return PyInt_FromLong(response);
     35    OSErr iErr;
     36    OSType selector;
     37    SInt32 response;
     38    if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
     39        return NULL;
     40    iErr = Gestalt ( selector, &response );
     41    if (iErr != 0)
     42        return PyMac_Error(iErr);
     43    return PyInt_FromLong(response);
    4444}
    4545
    4646static struct PyMethodDef gestalt_methods[] = {
    47         {"gestalt", gestalt_gestalt, METH_VARARGS},
    48         {NULL, NULL} /* Sentinel */
     47    {"gestalt", gestalt_gestalt, METH_VARARGS},
     48    {NULL, NULL} /* Sentinel */
    4949};
    5050
     
    5252initgestalt(void)
    5353{
    54         Py_InitModule("gestalt", gestalt_methods);
     54    Py_InitModule("gestalt", gestalt_methods);
    5555}
Note: See TracChangeset for help on using the changeset viewer.