summaryrefslogtreecommitdiffstats
path: root/Modules/_gestalt.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-05-09 15:52:27 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-05-09 15:52:27 (GMT)
commitf95a1b3c53bdd678b64aa608d4375660033460c3 (patch)
treea8bee40b1b14e28ff5978ea519f3035a3c399912 /Modules/_gestalt.c
parentbd250300191133d276a71b395b6428081bf825b8 (diff)
downloadcpython-f95a1b3c53bdd678b64aa608d4375660033460c3.zip
cpython-f95a1b3c53bdd678b64aa608d4375660033460c3.tar.gz
cpython-f95a1b3c53bdd678b64aa608d4375660033460c3.tar.bz2
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
Diffstat (limited to 'Modules/_gestalt.c')
-rw-r--r--Modules/_gestalt.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/Modules/_gestalt.c b/Modules/_gestalt.c
index 462a6d2..a45780f 100644
--- a/Modules/_gestalt.c
+++ b/Modules/_gestalt.c
@@ -4,10 +4,10 @@ The Netherlands.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
@@ -34,9 +34,9 @@ convert_to_OSType(PyObject *v, OSType *pr)
{
uint32_t tmp;
if (!PyUnicode_Check(v) || PyUnicode_GetSize(v) != 4) {
- PyErr_SetString(PyExc_TypeError,
- "OSType arg must be string of 4 chars");
- return 0;
+ PyErr_SetString(PyExc_TypeError,
+ "OSType arg must be string of 4 chars");
+ return 0;
}
memcpy((char *)&tmp, _PyUnicode_AsString(v), 4);
*pr = (OSType)ntohl(tmp);
@@ -50,12 +50,12 @@ gestalt_gestalt(PyObject *self, PyObject *args)
OSType selector;
SInt32 response;
if (!PyArg_ParseTuple(args, "O&", convert_to_OSType, &selector))
- return NULL;
+ return NULL;
iErr = Gestalt(selector, &response);
if (iErr != 0) {
- PyErr_SetString(PyExc_OSError,
- "non-zero exit code!");
- return NULL;
+ PyErr_SetString(PyExc_OSError,
+ "non-zero exit code!");
+ return NULL;
}
return PyLong_FromLong(response);
}
@@ -66,19 +66,19 @@ static struct PyMethodDef gestalt_methods[] = {
};
static struct PyModuleDef gestaltmodule = {
- PyModuleDef_HEAD_INIT,
- "_gestalt",
- NULL,
- -1,
- gestalt_methods,
- NULL,
- NULL,
- NULL,
- NULL
+ PyModuleDef_HEAD_INIT,
+ "_gestalt",
+ NULL,
+ -1,
+ gestalt_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
};
PyMODINIT_FUNC
PyInit__gestalt(void)
{
- return PyModule_Create(&gestaltmodule);
+ return PyModule_Create(&gestaltmodule);
}