[Python-checkins] CVS: python/dist/src/Mac/Modules/ae AEmodule.c,1.26,1.27
Jack Jansen
jackjansen@users.sourceforge.net
Wed, 20 Jun 2001 13:53:36 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/ae
In directory usw-pr-cvs1:/tmp/cvs-serv24625/MacPython/Mac/Modules/ae
Modified Files:
AEmodule.c
Log Message:
Adapted to Universal Headers 3.4: new refcontype and use UPP names in stead of Proc names for callback creation.
Index: AEmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ae/AEmodule.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** AEmodule.c 2001/05/22 21:50:54 1.26
--- AEmodule.c 2001/06/20 20:53:33 1.27
***************
*** 1205,1211 ****
static pascal OSErr
! GenericEventHandler(const AppleEvent *request, AppleEvent *reply, unsigned long refcon)
{
PyObject *handler = (PyObject *)refcon;
--- 1205,1216 ----
+ #if UNIVERSAL_INTERFACES_VERSION >= 0x0340
+ typedef long refcontype;
+ #else
+ typedef unsigned long refcontype;
+ #endif
static pascal OSErr
! GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon)
{
PyObject *handler = (PyObject *)refcon;
***************
*** 1245,1249 ****
upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
! upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
--- 1250,1254 ----
upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
! upp_GenericEventHandler = NewAEEventHandlerUPP(&GenericEventHandler);
PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);