summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/gestaltmodule.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Mac/Modules/gestaltmodule.c b/Mac/Modules/gestaltmodule.c
index f82687e..6d8673f 100644
--- a/Mac/Modules/gestaltmodule.c
+++ b/Mac/Modules/gestaltmodule.c
@@ -33,17 +33,10 @@ static PyObject *
gestalt_gestalt(PyObject *self, PyObject *args)
{
OSErr iErr;
- char *str;
- int size;
OSType selector;
long response;
- if (!PyArg_Parse(args, "s#", &str, &size))
+ if (!PyArg_Parse(args, "O&", PyMac_GetOSType, &selector))
return NULL;
- if (size != 4) {
- PyErr_SetString(PyExc_TypeError, "gestalt arg must be 4-char string");
- return NULL;
- }
- selector = *(OSType*)str;
iErr = Gestalt ( selector, &response );
if (iErr != 0)
return PyMac_Error(iErr);