diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-04-17 13:40:08 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-04-17 13:40:08 (GMT) |
commit | 6c1074888e147c11ac0175e97594daa4f0625844 (patch) | |
tree | 6353ef17fa9f6da7a71f1cd752bf2871bb1e1078 /Mac/Modules | |
parent | 749d070e93f0052bc9540c163d465a6c00eed4ed (diff) | |
download | cpython-6c1074888e147c11ac0175e97594daa4f0625844.zip cpython-6c1074888e147c11ac0175e97594daa4f0625844.tar.gz cpython-6c1074888e147c11ac0175e97594daa4f0625844.tar.bz2 |
This patches fixes a number of byteorder problems in MacOSX specific code.
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/gestaltmodule.c | 9 |
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); |