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
f801681e
Commit
f801681e
authored
Apr 24, 2000
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jack Jansen: A few new types needed by new API calls.
parent
8e2d0532
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Tools/bgen/bgen/macsupport.py
Tools/bgen/bgen/macsupport.py
+6
-4
No files found.
Tools/bgen/bgen/macsupport.py
View file @
f801681e
...
@@ -15,7 +15,7 @@ SignedByte = Type("SignedByte", "b")
...
@@ -15,7 +15,7 @@ SignedByte = Type("SignedByte", "b")
ScriptCode
=
Type
(
"ScriptCode"
,
"h"
)
ScriptCode
=
Type
(
"ScriptCode"
,
"h"
)
Size
=
Type
(
"Size"
,
"l"
)
Size
=
Type
(
"Size"
,
"l"
)
Style
=
Type
(
"Style"
,
"b"
)
Style
=
Type
(
"Style"
,
"b"
)
StyleParameter
=
Type
(
"Style"
,
"h"
)
StyleParameter
=
Type
(
"Style
Parameter
"
,
"h"
)
CharParameter
=
Type
(
"CharParameter"
,
"h"
)
CharParameter
=
Type
(
"CharParameter"
,
"h"
)
TextEncoding
=
Type
(
"TextEncoding"
,
"l"
)
TextEncoding
=
Type
(
"TextEncoding"
,
"l"
)
...
@@ -31,7 +31,8 @@ ConstStr255Param = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr2
...
@@ -31,7 +31,8 @@ ConstStr255Param = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr2
Str255
=
OpaqueArrayType
(
"Str255"
,
"PyMac_BuildStr255"
,
"PyMac_GetStr255"
)
Str255
=
OpaqueArrayType
(
"Str255"
,
"PyMac_BuildStr255"
,
"PyMac_GetStr255"
)
# File System Specifications
# File System Specifications
FSSpec
=
FSSpec_ptr
=
OpaqueType
(
"FSSpec"
,
"PyMac_BuildFSSpec"
,
"PyMac_GetFSSpec"
)
FSSpec_ptr
=
OpaqueType
(
"FSSpec"
,
"PyMac_BuildFSSpec"
,
"PyMac_GetFSSpec"
)
FSSpec
=
OpaqueByValueType
(
"FSSpec"
,
"PyMac_BuildFSSpec"
,
"PyMac_GetFSSpec"
)
# OSType and ResType: 4-byte character strings
# OSType and ResType: 4-byte character strings
def
OSTypeType
(
typename
):
def
OSTypeType
(
typename
):
...
@@ -85,6 +86,7 @@ OSStatus = OSErrType("OSStatus", 'l')
...
@@ -85,6 +86,7 @@ OSStatus = OSErrType("OSStatus", 'l')
# Various buffer types
# Various buffer types
InBuffer
=
VarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
InBuffer
=
VarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
OptionalInBuffer
=
OptionalVarInputBufferType
(
'char'
,
'long'
,
'l'
)
# (buf, len)
InOutBuffer
=
HeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, len)
InOutBuffer
=
HeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, len)
VarInOutBuffer
=
VarHeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, &len)
VarInOutBuffer
=
VarHeapInputOutputBufferType
(
'char'
,
'long'
,
'l'
)
# (inbuf, outbuf, &len)
...
@@ -151,9 +153,9 @@ initstuff = """
...
@@ -151,9 +153,9 @@ initstuff = """
# This requires that the OSErr type (defined above) has a non-trivial
# This requires that the OSErr type (defined above) has a non-trivial
# errorCheck method.
# errorCheck method.
class
OSErrMixIn
:
class
OSErrMixIn
:
"Mix-in class to treat OSErr return values special"
"Mix-in class to treat OSErr
/OSStatus
return values special"
def
makereturnvar
(
self
):
def
makereturnvar
(
self
):
if
self
.
returntype
is
OSErr
:
if
self
.
returntype
.
__class__
==
OSErrType
:
return
Variable
(
self
.
returntype
,
"_err"
,
ErrorMode
)
return
Variable
(
self
.
returntype
,
"_err"
,
ErrorMode
)
else
:
else
:
return
Variable
(
self
.
returntype
,
"_rv"
,
OutMode
)
return
Variable
(
self
.
returntype
,
"_rv"
,
OutMode
)
...
...
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