1515ScriptCode = Type ("ScriptCode" , "h" )
1616Size = Type ("Size" , "l" )
1717Style = Type ("Style" , "b" )
18- StyleParameter = Type ("StyleParameter " , "h" )
18+ StyleParameter = Type ("Style " , "h" )
1919CharParameter = Type ("CharParameter" , "h" )
2020TextEncoding = Type ("TextEncoding" , "l" )
2121
3131Str255 = OpaqueArrayType ("Str255" , "PyMac_BuildStr255" , "PyMac_GetStr255" )
3232
3333# File System Specifications
34- FSSpec_ptr = OpaqueType ("FSSpec" , "PyMac_BuildFSSpec" , "PyMac_GetFSSpec" )
34+ FSSpec = FSSpec_ptr = OpaqueType ("FSSpec" , "PyMac_BuildFSSpec" , "PyMac_GetFSSpec" )
3535
3636# OSType and ResType: 4-byte character strings
3737def OSTypeType (typename ):
@@ -66,6 +66,7 @@ def OSTypeType(typename):
6666# Quickdraw data types
6767Rect = Rect_ptr = OpaqueType ("Rect" , "PyMac_BuildRect" , "PyMac_GetRect" )
6868Point = OpaqueByValueType ("Point" , "PyMac_BuildPoint" , "PyMac_GetPoint" )
69+ Point_ptr = OpaqueType ("Point" , "PyMac_BuildPoint" , "PyMac_GetPoint" )
6970
7071# Event records
7172EventRecord = OpaqueType ("EventRecord" , "PyMac_BuildEventRecord" , "PyMac_GetEventRecord" )
@@ -84,7 +85,6 @@ def errorCheck(self, name):
8485# Various buffer types
8586
8687InBuffer = VarInputBufferType ('char' , 'long' , 'l' ) # (buf, len)
87- OptionalInBuffer = OptionalVarInputBufferType ('char' , 'long' , 'l' ) # (buf, len)
8888
8989InOutBuffer = HeapInputOutputBufferType ('char' , 'long' , 'l' ) # (inbuf, outbuf, len)
9090VarInOutBuffer = VarHeapInputOutputBufferType ('char' , 'long' , 'l' ) # (inbuf, outbuf, &len)
@@ -151,9 +151,9 @@ def errorCheck(self, name):
151151# This requires that the OSErr type (defined above) has a non-trivial
152152# errorCheck method.
153153class OSErrMixIn :
154- "Mix-in class to treat OSErr/OSStatus return values special"
154+ "Mix-in class to treat OSErr return values special"
155155 def makereturnvar (self ):
156- if self .returntype . __class__ == OSErrType :
156+ if self .returntype is OSErr :
157157 return Variable (self .returntype , "_err" , ErrorMode )
158158 else :
159159 return Variable (self .returntype , "_rv" , OutMode )
0 commit comments