diff options
author | Guido van Rossum <guido@python.org> | 2000-04-24 14:56:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-04-24 14:56:00 (GMT) |
commit | e56b4cf804c4672f223766b05c91cf420be03fb8 (patch) | |
tree | e7addb595243ca23653990e2be6566856760eb38 /Tools | |
parent | 1d8fcdaceaeb535dbe9a13797527ff420c42b61b (diff) | |
download | cpython-e56b4cf804c4672f223766b05c91cf420be03fb8.zip cpython-e56b4cf804c4672f223766b05c91cf420be03fb8.tar.gz cpython-e56b4cf804c4672f223766b05c91cf420be03fb8.tar.bz2 |
Jack Jansen: A few new types needed by new API calls.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/bgen/bgen/macsupport.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Tools/bgen/bgen/macsupport.py b/Tools/bgen/bgen/macsupport.py index 344f87b..05d584d 100644 --- a/Tools/bgen/bgen/macsupport.py +++ b/Tools/bgen/bgen/macsupport.py @@ -15,7 +15,7 @@ SignedByte = Type("SignedByte", "b") ScriptCode = Type("ScriptCode", "h") Size = Type("Size", "l") Style = Type("Style", "b") -StyleParameter = Type("Style", "h") +StyleParameter = Type("StyleParameter", "h") CharParameter = Type("CharParameter", "h") TextEncoding = Type("TextEncoding", "l") @@ -31,7 +31,8 @@ ConstStr255Param = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr2 Str255 = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr255") # 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 def OSTypeType(typename): @@ -85,6 +86,7 @@ OSStatus = OSErrType("OSStatus", 'l') # Various buffer types InBuffer = VarInputBufferType('char', 'long', 'l') # (buf, len) +OptionalInBuffer = OptionalVarInputBufferType('char', 'long', 'l') # (buf, len) InOutBuffer = HeapInputOutputBufferType('char', 'long', 'l') # (inbuf, outbuf, len) VarInOutBuffer = VarHeapInputOutputBufferType('char', 'long', 'l') # (inbuf, outbuf, &len) @@ -151,9 +153,9 @@ initstuff = """ # This requires that the OSErr type (defined above) has a non-trivial # errorCheck method. class OSErrMixIn: - "Mix-in class to treat OSErr return values special" + "Mix-in class to treat OSErr/OSStatus return values special" def makereturnvar(self): - if self.returntype is OSErr: + if self.returntype.__class__ == OSErrType: return Variable(self.returntype, "_err", ErrorMode) else: return Variable(self.returntype, "_rv", OutMode) |