[Python-checkins] CVS: python/dist/src/Mac/Modules/mlte _Mltemodule.c,NONE,1.1
Jack Jansen
jackjansen@users.sourceforge.net
Thu, 23 Aug 2001 07:00:20 -0700
Update of /cvsroot/python/python/dist/src/Mac/Modules/mlte
In directory usw-pr-cvs1:/tmp/cvs-serv30194/Python/Mac/Modules/mlte
Added Files:
_Mltemodule.c
Log Message:
Renamed the Mac toolbox modules to have an initial _ in their name.
--- NEW FILE: _Mltemodule.c ---
/* ========================== Module _Mlte ========================== */
#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
[...1353 lines suppressed...]
m = Py_InitModule("_Mlte", Mlte_methods);
d = PyModule_GetDict(m);
Mlte_Error = PyMac_GetOSErrException();
if (Mlte_Error == NULL ||
PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
return;
TXNObject_Type.ob_type = &PyType_Type;
Py_INCREF(&TXNObject_Type);
if (PyDict_SetItemString(d, "TXNObjectType", (PyObject *)&TXNObject_Type) != 0)
Py_FatalError("can't initialize TXNObjectType");
TXNFontMenuObject_Type.ob_type = &PyType_Type;
Py_INCREF(&TXNFontMenuObject_Type);
if (PyDict_SetItemString(d, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type) != 0)
Py_FatalError("can't initialize TXNFontMenuObjectType");
}
/* ======================== End module _Mlte ======================== */