Changeset 391 for python/trunk/Mac/Modules/gestaltmodule.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/Mac/Modules/gestaltmodule.c
r2 r391 5 5 All Rights Reserved 6 6 7 Permission to use, copy, modify, and distribute this software and its 8 documentation for any purpose and without fee is hereby granted, 7 Permission to use, copy, modify, and distribute this software and its 8 documentation for any purpose and without fee is hereby granted, 9 9 provided that the above copyright notice appear in all copies and that 10 both that copyright notice and this permission notice appear in 10 both that copyright notice and this permission notice appear in 11 11 supporting documentation, and that the names of Stichting Mathematisch 12 12 Centrum or CWI not be used in advertising or publicity pertaining to … … 33 33 gestalt_gestalt(PyObject *self, PyObject *args) 34 34 { 35 36 37 38 39 40 41 if (iErr != 0) 42 43 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); 44 44 } 45 45 46 46 static struct PyMethodDef gestalt_methods[] = { 47 48 47 {"gestalt", gestalt_gestalt, METH_VARARGS}, 48 {NULL, NULL} /* Sentinel */ 49 49 }; 50 50 … … 52 52 initgestalt(void) 53 53 { 54 54 Py_InitModule("gestalt", gestalt_methods); 55 55 }
Note:
See TracChangeset
for help on using the changeset viewer.