[Python-checkins] CVS: python/dist/src/Mac/Modules/drag Dragmodule.c,1.6,1.7
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 17 May 2001 14:55:19 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/drag
In directory usw-pr-cvs1:/tmp/cvs-serv7825/Python/Mac/Modules/drag
Modified Files:
Dragmodule.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: Dragmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/Dragmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Dragmodule.c 2001/02/05 13:47:13 1.6
--- Dragmodule.c 2001/05/17 21:55:17 1.7
***************
*** 20,23 ****
--- 20,31 ----
#endif
+ #ifdef USE_TOOLBOX_OBJECT_GLUE
+ extern PyObject *_DragObj_New(DragRef);
+ extern int _DragObj_Convert(PyObject *, DragRef *);
+
+ #define DragObj_New _DragObj_New
+ #define DragObj_Convert _DragObj_Convert
+ #endif
+
static PyObject *Drag_Error;
***************
*** 1040,1043 ****
--- 1048,1054 ----
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(DragObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragObj_Convert);