summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/ae
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/ae')
-rw-r--r--Mac/Modules/ae/AEmodule.c10
-rw-r--r--Mac/Modules/ae/aesupport.py10
2 files changed, 20 insertions, 0 deletions
diff --git a/Mac/Modules/ae/AEmodule.c b/Mac/Modules/ae/AEmodule.c
index e0ce470..d4aab79 100644
--- a/Mac/Modules/ae/AEmodule.c
+++ b/Mac/Modules/ae/AEmodule.c
@@ -11,6 +11,14 @@
#include <AppleEvents.h>
#include <AEObjects.h>
+#ifdef USE_TOOLBOX_OBJECT_GLUE
+extern PyObject *_AEDesc_New(AEDesc *);
+extern int _AEDesc_Convert(PyObject *, AEDesc *);
+
+#define AEDesc_New _AEDesc_New
+#define AEDesc_Convert _AEDesc_Convert
+#endif
+
static pascal OSErr GenericEventHandler(); /* Forward */
AEEventHandlerUPP upp_GenericEventHandler;
@@ -1331,6 +1339,8 @@ void initAE()
upp_AEIdleProc = NewAEIdleProc(AEIdleProc);
upp_GenericEventHandler = NewAEEventHandlerProc(GenericEventHandler);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc_Convert);
m = Py_InitModule("AE", AE_methods);
diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py
index 86f2094..094a309 100644
--- a/Mac/Modules/ae/aesupport.py
+++ b/Mac/Modules/ae/aesupport.py
@@ -85,6 +85,14 @@ includestuff = includestuff + """
#include <AppleEvents.h>
#include <AEObjects.h>
+#ifdef USE_TOOLBOX_OBJECT_GLUE
+extern PyObject *_AEDesc_New(AEDesc *);
+extern int _AEDesc_Convert(PyObject *, AEDesc *);
+
+#define AEDesc_New _AEDesc_New
+#define AEDesc_Convert _AEDesc_Convert
+#endif
+
static pascal OSErr GenericEventHandler(); /* Forward */
AEEventHandlerUPP upp_GenericEventHandler;
@@ -138,6 +146,8 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, unsigned long
initstuff = initstuff + """
upp_AEIdleProc = NewAEIdleProc(AEIdleProc);
upp_GenericEventHandler = NewAEEventHandlerProc(GenericEventHandler);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc_Convert);
"""
module = MacModule('AE', 'AE', includestuff, finalstuff, initstuff)