From: Jack Jansen Date: Thu, 17 Aug 1995 14:24:35 +0000 (+0000) Subject: Different arg to GetEventHandler (but I cannot really remember fixing X-Git-Tag: v1.3b1~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ce4d51068a1bcbdc952559b79819cb132b94cb4;p=thirdparty%2FPython%2Fcpython.git Different arg to GetEventHandler (but I cannot really remember fixing this.... Hope it is correct) --- diff --git a/Mac/Modules/ae/AEmodule.c b/Mac/Modules/ae/AEmodule.c index a4f56d6c3189..2d759770d6bf 100644 --- a/Mac/Modules/ae/AEmodule.c +++ b/Mac/Modules/ae/AEmodule.c @@ -14,6 +14,7 @@ #include extern PyObject *ResObj_New(Handle); +extern PyObject *ResObj_OptNew(Handle); extern int ResObj_Convert(PyObject *, Handle *); extern PyObject *WinObj_New(WindowPtr); @@ -1051,19 +1052,20 @@ static PyObject *AE_AEGetEventHandler(_self, _args) OSErr _err; AEEventClass theAEEventClass; AEEventID theAEEventID; - long procptr, handlerptr; - + AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler; + PyObject *handler; if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &theAEEventClass, PyMac_GetOSType, &theAEEventID)) return NULL; _err = AEGetEventHandler(theAEEventClass, theAEEventID, - (AEEventHandlerUPP *)&procptr, &handlerptr, + &handler__proc__, (long *)&handler, 0); if (_err != noErr) return PyMac_Error(_err); - _res = Py_BuildValue("ll", - (long)procptr, (long)handlerptr); + _res = Py_BuildValue("O", + handler); + Py_INCREF(handler); /* XXX leak, but needed */ return _res; }