Kaydet (Commit) 8ce4d510 authored tarafından Jack Jansen's avatar Jack Jansen

Different arg to GetEventHandler (but I cannot really remember fixing

this.... Hope it is correct)
üst 7e0da905
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <Controls.h> #include <Controls.h>
extern PyObject *ResObj_New(Handle); extern PyObject *ResObj_New(Handle);
extern PyObject *ResObj_OptNew(Handle);
extern int ResObj_Convert(PyObject *, Handle *); extern int ResObj_Convert(PyObject *, Handle *);
extern PyObject *WinObj_New(WindowPtr); extern PyObject *WinObj_New(WindowPtr);
...@@ -1051,19 +1052,20 @@ static PyObject *AE_AEGetEventHandler(_self, _args) ...@@ -1051,19 +1052,20 @@ static PyObject *AE_AEGetEventHandler(_self, _args)
OSErr _err; OSErr _err;
AEEventClass theAEEventClass; AEEventClass theAEEventClass;
AEEventID theAEEventID; AEEventID theAEEventID;
long procptr, handlerptr; AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
PyObject *handler;
if (!PyArg_ParseTuple(_args, "O&O&", if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetOSType, &theAEEventClass, PyMac_GetOSType, &theAEEventClass,
PyMac_GetOSType, &theAEEventID)) PyMac_GetOSType, &theAEEventID))
return NULL; return NULL;
_err = AEGetEventHandler(theAEEventClass, _err = AEGetEventHandler(theAEEventClass,
theAEEventID, theAEEventID,
(AEEventHandlerUPP *)&procptr, &handlerptr, &handler__proc__, (long *)&handler,
0); 0);
if (_err != noErr) return PyMac_Error(_err); if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("ll", _res = Py_BuildValue("O",
(long)procptr, (long)handlerptr); handler);
Py_INCREF(handler); /* XXX leak, but needed */
return _res; return _res;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment