summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-08-17 14:24:35 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-08-17 14:24:35 (GMT)
commit8ce4d51068a1bcbdc952559b79819cb132b94cb4 (patch)
tree3194a7ba64e3713cb86e1120cb0bb50b12d94cf8 /Mac
parent7e0da905e304e2c48ed44ee6fa374ce1434cd225 (diff)
downloadcpython-8ce4d51068a1bcbdc952559b79819cb132b94cb4.zip
cpython-8ce4d51068a1bcbdc952559b79819cb132b94cb4.tar.gz
cpython-8ce4d51068a1bcbdc952559b79819cb132b94cb4.tar.bz2
Different arg to GetEventHandler (but I cannot really remember fixing
this.... Hope it is correct)
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/ae/AEmodule.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Mac/Modules/ae/AEmodule.c b/Mac/Modules/ae/AEmodule.c
index a4f56d6..2d75977 100644
--- a/Mac/Modules/ae/AEmodule.c
+++ b/Mac/Modules/ae/AEmodule.c
@@ -14,6 +14,7 @@
#include <Controls.h>
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;
}