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

Jack Jansen jackjansen@users.sourceforge.net
Thu, 23 Aug 2001 07:01:31 -0700


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

Added Files:
	_Ctlmodule.c 
Log Message:
Renamed the Mac toolbox modules to have an initial _ in their name.

--- NEW FILE: _Ctlmodule.c ---

/* ========================== Module _Ctl =========================== */

#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
[...2655 lines suppressed...]
	myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
	mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
	PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
	PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);


	m = Py_InitModule("_Ctl", Ctl_methods);
	d = PyModule_GetDict(m);
	Ctl_Error = PyMac_GetOSErrException();
	if (Ctl_Error == NULL ||
	    PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
		return;
	Control_Type.ob_type = &PyType_Type;
	Py_INCREF(&Control_Type);
	if (PyDict_SetItemString(d, "ControlType", (PyObject *)&Control_Type) != 0)
		Py_FatalError("can't initialize ControlType");
}

/* ======================== End module _Ctl ========================= */