[Python-checkins] CVS: python/dist/src/Mac/Modules/te _TEmodule.c,NONE,1.1

Jack Jansen jackjansen@users.sourceforge.net
2001年8月23日 06:58:55 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/te
In directory usw-pr-cvs1:/tmp/cvs-serv29743/Python/Mac/Modules/te
Added Files:
	_TEmodule.c 
Log Message:
Renamed the Mac toolbox modules to have an initial _ in their name.
--- NEW FILE: _TEmodule.c ---
/* =========================== Module _TE =========================== */
#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
[...1001 lines suppressed...]
		PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
	m = Py_InitModule("_TE", TE_methods);
	d = PyModule_GetDict(m);
	TE_Error = PyMac_GetOSErrException();
	if (TE_Error == NULL ||
	 PyDict_SetItemString(d, "Error", TE_Error) != 0)
		return;
	TE_Type.ob_type = &PyType_Type;
	Py_INCREF(&TE_Type);
	if (PyDict_SetItemString(d, "TEType", (PyObject *)&TE_Type) != 0)
		Py_FatalError("can't initialize TEType");
}
/* ========================= End module _TE ========================= */

AltStyle によって変換されたページ (->オリジナル) /