[Python-checkins] CVS: python/dist/src/Mac/Modules/evt _Evtmodule.c,1.4,1.5
Jack Jansen
jackjansen@users.sourceforge.net
Mon, 17 Dec 2001 03:46:47 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/evt
In directory usw-pr-cvs1:/tmp/cvs-serv10452/python/Mac/Modules/evt
Modified Files:
_Evtmodule.c
Log Message:
TickCount moved to a different header file. We manually added it back in here, for conveninece.
Index: _Evtmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/evt/_Evtmodule.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** _Evtmodule.c 2001/12/16 20:16:15 1.4
--- _Evtmodule.c 2001/12/17 11:46:45 1.5
***************
*** 6,11 ****
--- 6,15 ----
+ #ifdef _WIN32
+ #include "pywintoolbox.h"
+ #else
#include "macglue.h"
#include "pymactoolbox.h"
+ #endif
/* Macro to test whether a weak-loaded CFM function exists */
***************
*** 456,459 ****
--- 460,475 ----
}
+ static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TickCount();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+ }
+
static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args)
{
***************
*** 567,570 ****
--- 583,588 ----
{"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1,
"(UInt8 value) -> None"},
+ {"TickCount", (PyCFunction)Evt_TickCount, 1,
+ "() -> (UInt32 _rv)"},
{"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
"(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"},