[Python-checkins] CVS: python/dist/src/Mac/Modules/ae _AEmodule.c,NONE,1.1
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 23 Aug 2001 07:02:05 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/ae
In directory usw-pr-cvs1:/tmp/cvs-serv30776/Python/Mac/Modules/ae
Added Files:
_AEmodule.c
Log Message:
Renamed the Mac toolbox modules to have an initial _ in their name.
--- NEW FILE: _AEmodule.c ---
/* =========================== Module _AE =========================== */
#include "Python.h"
#include "macglue.h"
#include "pymactoolbox.h"
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
PyErr_SetString(PyExc_NotImplementedError, \
"Not available in this shared library/OS version"); \
return NULL; \
}} while(0)
#ifdef WITHOUT_FRAMEWORKS
[...1244 lines suppressed...]
upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
#endif
PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
m = Py_InitModule("_AE", AE_methods);
d = PyModule_GetDict(m);
AE_Error = PyMac_GetOSErrException();
if (AE_Error == NULL ||
PyDict_SetItemString(d, "Error", AE_Error) != 0)
return;
AEDesc_Type.ob_type = &PyType_Type;
Py_INCREF(&AEDesc_Type);
if (PyDict_SetItemString(d, "AEDescType", (PyObject *)&AEDesc_Type) != 0)
Py_FatalError("can't initialize AEDescType");
}
/* ========================= End module _AE ========================= */