summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/te/tesupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/te/tesupport.py')
-rw-r--r--Mac/Modules/te/tesupport.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py
index 337ac2b..5512be0 100644
--- a/Mac/Modules/te/tesupport.py
+++ b/Mac/Modules/te/tesupport.py
@@ -34,6 +34,14 @@ TextStyle_ptr = TextStyle
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+#ifdef USE_TOOLBOX_OBJECT_GLUE
+extern PyObject *_TEObj_New(TEHandle);
+extern int _TEObj_Convert(PyObject *, TEHandle *);
+
+#define TEObj_New _TEObj_New
+#define TEObj_Convert _TEObj_Convert
+#endif
+
#define as_TE(h) ((TEHandle)h)
#define as_Resource(teh) ((Handle)teh)
@@ -65,6 +73,11 @@ TextStyle_Convert(v, p_itself)
}
"""
+initstuff = initstuff + """
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert);
+"""
+
class TEMethodGenerator(OSErrMethodGenerator):
"""Similar to MethodGenerator, but has self as last argument"""