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

Jack Jansen jackjansen@users.sourceforge.net
Mon, 05 Nov 2001 08:21:42 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt
In directory usw-pr-cvs1:/tmp/cvs-serv20375/python/Mac/Modules/carbonevt

Added Files:
	_CarbonEvt.c 
Log Message:
Correctly builds the C module now.

--- NEW FILE: _CarbonEvt.c ---

/* ====================== Module CarbonEvents ======================= */

#include "Python.h"



#include <Carbon/Carbon.h>
#include "macglue.h"

#define USE_MAC_MP_MULTITHREADING 1

#if USE_MAC_MP_MULTITHREADING
static PyThreadState *_save;
static MPCriticalRegionID reentrantLock;
#endif /* USE_MAC_MP_MULTITHREADING */

extern int CFStringRef_New(CFStringRef *);

[...1557 lines suppressed...]
	EventHandlerRef_Type.ob_type = &PyType_Type;
	Py_INCREF(&EventHandlerRef_Type);
	if (PyDict_SetItemString(d, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type) != 0)
		Py_FatalError("can't initialize EventHandlerRefType");
	EventHandlerCallRef_Type.ob_type = &PyType_Type;
	Py_INCREF(&EventHandlerCallRef_Type);
	if (PyDict_SetItemString(d, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type) != 0)
		Py_FatalError("can't initialize EventHandlerCallRefType");
	EventTargetRef_Type.ob_type = &PyType_Type;
	Py_INCREF(&EventTargetRef_Type);
	if (PyDict_SetItemString(d, "EventTargetRefType", (PyObject *)&EventTargetRef_Type) != 0)
		Py_FatalError("can't initialize EventTargetRefType");
	EventHotKeyRef_Type.ob_type = &PyType_Type;
	Py_INCREF(&EventHotKeyRef_Type);
	if (PyDict_SetItemString(d, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type) != 0)
		Py_FatalError("can't initialize EventHotKeyRefType");
}

/* ==================== End module CarbonEvents ===================== */