|
15 | 15 | ScriptCode = Type("ScriptCode", "h") |
16 | 16 | Size = Type("Size", "l") |
17 | 17 | Style = Type("Style", "b") |
18 | | -StyleParameter = Type("Style", "h") |
| 18 | +StyleParameter = Type("StyleParameter", "h") |
19 | 19 | CharParameter = Type("CharParameter", "h") |
20 | 20 | TextEncoding = Type("TextEncoding", "l") |
21 | 21 |
|
|
31 | 31 | Str255 = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr255") |
32 | 32 |
|
33 | 33 | # File System Specifications |
34 | | -FSSpec = FSSpec_ptr = OpaqueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") |
| 34 | +FSSpec_ptr = OpaqueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") |
| 35 | +FSSpec = OpaqueByValueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") |
35 | 36 |
|
36 | 37 | # OSType and ResType: 4-byte character strings |
37 | 38 | def OSTypeType(typename): |
@@ -85,6 +86,7 @@ def errorCheck(self, name): |
85 | 86 | # Various buffer types |
86 | 87 |
|
87 | 88 | InBuffer = VarInputBufferType('char', 'long', 'l') # (buf, len) |
| 89 | +OptionalInBuffer = OptionalVarInputBufferType('char', 'long', 'l') # (buf, len) |
88 | 90 |
|
89 | 91 | InOutBuffer = HeapInputOutputBufferType('char', 'long', 'l') # (inbuf, outbuf, len) |
90 | 92 | VarInOutBuffer = VarHeapInputOutputBufferType('char', 'long', 'l') # (inbuf, outbuf, &len) |
@@ -151,9 +153,9 @@ def errorCheck(self, name): |
151 | 153 | # This requires that the OSErr type (defined above) has a non-trivial |
152 | 154 | # errorCheck method. |
153 | 155 | class OSErrMixIn: |
154 | | - "Mix-in class to treat OSErr return values special" |
| 156 | + "Mix-in class to treat OSErr/OSStatus return values special" |
155 | 157 | def makereturnvar(self): |
156 | | - if self.returntype is OSErr: |
| 158 | + if self.returntype.__class__ == OSErrType: |
157 | 159 | return Variable(self.returntype, "_err", ErrorMode) |
158 | 160 | else: |
159 | 161 | return Variable(self.returntype, "_rv", OutMode) |
|
0 commit comments