[Python-checkins] CVS: python/dist/src/Mac/Modules/qdoffs Qdoffsmodule.c,1.6,1.7
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 17 May 2001 14:56:53 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/qdoffs
In directory usw-pr-cvs1:/tmp/cvs-serv8265/Python/Mac/Modules/qdoffs
Modified Files:
Qdoffsmodule.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: Qdoffsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qdoffs/Qdoffsmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Qdoffsmodule.c 2000/12/19 22:28:14 1.6
--- Qdoffsmodule.c 2001/05/17 21:56:51 1.7
***************
*** 11,14 ****
--- 11,22 ----
#include <QDOffscreen.h>
+ #ifdef USE_TOOLBOX_OBJECT_GLUE
+ extern PyObject *_GWorldObj_New(GWorldPtr);
+ extern int _GWorldObj_Convert(PyObject *, GWorldPtr *);
+
+ #define GWorldObj_New _GWorldObj_New
+ #define GWorldObj_Convert _GWorldObj_Convert
+ #endif
+
#define as_GrafPtr(gworld) ((GrafPtr)(gworld))
***************
*** 622,625 ****
--- 630,636 ----
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldObj_Convert);