[Python-checkins] CVS: python/dist/src/Mac/Modules/te TEmodule.c,1.12,1.13
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 17 May 2001 14:58:14 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/te
In directory usw-pr-cvs1:/tmp/cvs-serv8604/Python/Mac/Modules/te
Modified Files:
TEmodule.c
Log Message:
First step in porting MacPython modules to OSX/unix: break all references between modules except for the obj_New() and obj_Convert() routines, the PyArg_Parse and Py_BuildValue helpers.
And these can now be vectored through glue routines (by defining USE_TOOLBOX_OBJECT_GLUE) which will do the necessary imports, whereupon the module's init routine will tell the glue routine about the real conversion routine address and everything is fine again.
Index: TEmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/te/TEmodule.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** TEmodule.c 2000/12/12 22:10:20 1.12
--- TEmodule.c 2001/05/17 21:58:12 1.13
***************
*** 11,14 ****
--- 11,22 ----
#include <TextEdit.h>
+ #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)
***************
*** 1105,1108 ****
--- 1113,1119 ----
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert);