Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1804f368
Commit
1804f368
authored
Dec 17, 2001
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TickCount moved to a different header file. We manually added it back in here, for conveninece.
parent
2f324aa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Mac/Modules/evt/_Evtmodule.c
Mac/Modules/evt/_Evtmodule.c
+18
-0
Mac/Modules/evt/evtsupport.py
Mac/Modules/evt/evtsupport.py
+6
-0
No files found.
Mac/Modules/evt/_Evtmodule.c
View file @
1804f368
...
...
@@ -5,8 +5,12 @@
#ifdef _WIN32
#include "pywintoolbox.h"
#else
#include "macglue.h"
#include "pymactoolbox.h"
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
...
...
@@ -455,6 +459,18 @@ static PyObject *Evt_LMSetKbdType(PyObject *_self, PyObject *_args)
return
_res
;
}
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
)
{
PyObject
*
_res
=
NULL
;
...
...
@@ -566,6 +582,8 @@ static PyMethodDef Evt_methods[] = {
"() -> (UInt8 _rv)"
},
{
"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)"
},
{
NULL
,
NULL
,
0
}
...
...
Mac/Modules/evt/evtsupport.py
View file @
1804f368
...
...
@@ -72,6 +72,11 @@ functions = []
##methods = []
execfile
(
INPUTFILE
)
# Move TickCount here, for convenience
f
=
Function
(
UInt32
,
'TickCount'
,
)
functions
.
append
(
f
)
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
for
f
in
functions
:
module
.
add
(
f
)
...
...
@@ -102,6 +107,7 @@ f = ManualGenerator("WaitNextEvent", WaitNextEvent_body);
f
.
docstring
=
lambda
:
"(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"
module
.
add
(
f
)
# generate output (open the output file as late as possible)
SetOutputFileName
(
OUTPUTFILE
)
module
.
generate
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment