[Python-checkins] CVS: python/dist/src/Mac/Modules/ae AEmodule.c,1.24,1.25

Jack Jansen jackjansen@users.sourceforge.net
Thu, 17 May 2001 14:54:16 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/ae
In directory usw-pr-cvs1:/tmp/cvs-serv7500/Python/Mac/Modules/ae

Modified Files:
	AEmodule.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: AEmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ae/AEmodule.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** AEmodule.c	2000/12/12 22:09:11	1.24
--- AEmodule.c	2001/05/17 21:54:14	1.25
***************
*** 12,15 ****
--- 12,23 ----
  #include <AEObjects.h>
  
+ #ifdef USE_TOOLBOX_OBJECT_GLUE
+ extern PyObject *_AEDesc_New(AEDesc *);
+ extern int _AEDesc_Convert(PyObject *, AEDesc *);
+ 
+ #define AEDesc_New _AEDesc_New
+ #define AEDesc_Convert _AEDesc_Convert
+ #endif
+ 
  static pascal OSErr GenericEventHandler(); /* Forward */
  
***************
*** 1332,1335 ****
--- 1340,1345 ----
  		upp_AEIdleProc = NewAEIdleProc(AEIdleProc);
  		upp_GenericEventHandler = NewAEEventHandlerProc(GenericEventHandler);
+ 		PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc_New);
+ 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc_Convert);