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
67a7e39d
Commit
67a7e39d
authored
Jan 03, 2002
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed SetEventParameter() signature: removed unneccesary length arg.
parent
5b471ffd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
Mac/Modules/carbonevt/CarbonEvtscan.py
Mac/Modules/carbonevt/CarbonEvtscan.py
+4
-1
Mac/Modules/carbonevt/CarbonEvtsupport.py
Mac/Modules/carbonevt/CarbonEvtsupport.py
+6
-0
Mac/Modules/carbonevt/_CarbonEvtmodule.c
Mac/Modules/carbonevt/_CarbonEvtmodule.c
+8
-8
No files found.
Mac/Modules/carbonevt/CarbonEvtscan.py
View file @
67a7e39d
...
...
@@ -107,7 +107,10 @@ class CarbonEvents_Scanner(Scanner_OSX):
# ]
def
makerepairinstructions
(
self
):
return
[]
return
[
([(
"UInt32"
,
'inSize'
,
"InMode"
),
(
"void_ptr"
,
'inDataPtr'
,
"InMode"
)],
[(
"MyInBuffer"
,
'inDataPtr'
,
"InMode"
)])
]
if
__name__
==
"__main__"
:
main
()
Mac/Modules/carbonevt/CarbonEvtsupport.py
View file @
67a7e39d
...
...
@@ -34,6 +34,12 @@ EventTypeSpec_ptr = OpaqueType("EventTypeSpec", "EventTypeSpec")
void_ptr
=
stringptr
# here are some types that are really other types
class
MyVarInputBufferType
(
VarInputBufferType
):
def
passInput
(
self
,
name
):
return
"%s__len__, %s__in__"
%
(
name
,
name
)
MyInBuffer
=
MyVarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
EventTime
=
double
EventTimeout
=
EventTime
EventTimerInterval
=
EventTime
...
...
Mac/Modules/carbonevt/_CarbonEvtmodule.c
View file @
67a7e39d
...
...
@@ -215,19 +215,19 @@ static PyObject *EventRef_SetEventParameter(EventRefObject *_self, PyObject *_ar
OSStatus
_err
;
OSType
inName
;
OSType
inType
;
UInt32
inSize
;
char
*
inDataPtr
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&ls"
,
char
*
inDataPtr__in__
;
long
inDataPtr__len__
;
int
inDataPtr__in_len__
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&s#"
,
PyMac_GetOSType
,
&
inName
,
PyMac_GetOSType
,
&
inType
,
&
inSize
,
&
inDataPtr
))
&
inDataPtr__in__
,
&
inDataPtr__in_len__
))
return
NULL
;
inDataPtr__len__
=
inDataPtr__in_len__
;
_err
=
SetEventParameter
(
_self
->
ob_itself
,
inName
,
inType
,
inSize
,
inDataPtr
);
inDataPtr__len__
,
inDataPtr__in__
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
Py_INCREF
(
Py_None
);
_res
=
Py_None
;
...
...
@@ -386,7 +386,7 @@ static PyMethodDef EventRef_methods[] = {
{
"ReleaseEvent"
,
(
PyCFunction
)
EventRef_ReleaseEvent
,
1
,
"() -> None"
},
{
"SetEventParameter"
,
(
PyCFunction
)
EventRef_SetEventParameter
,
1
,
"(OSType inName, OSType inType,
UInt32 inSize, char*
inDataPtr) -> None"
},
"(OSType inName, OSType inType,
Buffer
inDataPtr) -> None"
},
{
"GetEventClass"
,
(
PyCFunction
)
EventRef_GetEventClass
,
1
,
"() -> (UInt32 _rv)"
},
{
"GetEventKind"
,
(
PyCFunction
)
EventRef_GetEventKind
,
1
,
...
...
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