summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/cm/cmsupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/cm/cmsupport.py')
-rw-r--r--Mac/Modules/cm/cmsupport.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py
index 598b51d..5681c81 100644
--- a/Mac/Modules/cm/cmsupport.py
+++ b/Mac/Modules/cm/cmsupport.py
@@ -22,6 +22,17 @@ from macsupport import *
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+#ifdef USE_TOOLBOX_OBJECT_GLUE
+extern PyObject *_CmpObj_New(Component);
+extern int _CmpObj_Convert(PyObject *, Component *);
+extern PyObject *_CmpInstObj_New(ComponentInstance);
+extern int _CmpInstObj_Convert(PyObject *, ComponentInstance *);
+
+#define CmpObj_New _CmpObj_New
+#define CmpObj_Convert _CmpObj_Convert
+#define CmpInstObj_New _CmpInstObj_New
+#define CmpInstObj_Convert _CmpInstObj_Convert
+#endif
/*
** Parse/generate ComponentDescriptor records
@@ -52,6 +63,13 @@ CmpDesc_Convert(v, p_itself)
"""
+initstuff = initstuff + """
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpInstObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpInstObj_Convert);
+"""
+
ComponentDescription = OpaqueType('ComponentDescription', 'CmpDesc')
Component = OpaqueByValueType('Component', C_OBJECTPREFIX)
ComponentInstance = OpaqueByValueType('ComponentInstance', CI_OBJECTPREFIX)