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.
This commit is contained in:
Jack Jansen 2001-05-17 21:58:34 +00:00
parent 99f9baa331
commit 0e04eecdbf
26 changed files with 463 additions and 2 deletions

View file

@ -54,6 +54,14 @@ DragSendDataUPP dragglue_SendDataUPP;
DragInputUPP dragglue_InputUPP;
DragDrawingUPP dragglue_DrawingUPP;
#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
"""
finalstuff = finalstuff + """
@ -153,6 +161,11 @@ dragglue_Drawing(xxxx
"""
initstuff = initstuff + """
PyMac_INIT_TOOLBOX_OBJECT_NEW(DragObj_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragObj_Convert);
"""
variablestuff = """
dragglue_TrackingHandlerUPP = NewDragTrackingHandlerProc(dragglue_TrackingHandler);
dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerProc(dragglue_ReceiveHandler);