diff options
Diffstat (limited to 'Tools/bgen')
-rw-r--r-- | Tools/bgen/bgen/bgenType.py | 8 | ||||
-rw-r--r-- | Tools/bgen/bgen/macsupport.py | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Tools/bgen/bgen/bgenType.py b/Tools/bgen/bgen/bgenType.py index fa316a7..9b4f11f 100644 --- a/Tools/bgen/bgen/bgenType.py +++ b/Tools/bgen/bgen/bgenType.py @@ -233,6 +233,14 @@ class OpaqueByValueType(OpaqueType): def mkvalueArgs(self, name): return "%s, %s" % (self.new, name) + +class OpaqueByValueStructType(OpaqueByValueType): + """Similar to OpaqueByValueType, but we also pass this to mkvalue by + address, in stead of by value. + """ + + def mkvalueArgs(self, name): + return "%s, &%s" % (self.new, name) class OpaqueArrayType(OpaqueByValueType): diff --git a/Tools/bgen/bgen/macsupport.py b/Tools/bgen/bgen/macsupport.py index 2caac97..bd38f02 100644 --- a/Tools/bgen/bgen/macsupport.py +++ b/Tools/bgen/bgen/macsupport.py @@ -46,9 +46,9 @@ ConstStringPtr = StringPtr # File System Specifications FSSpec_ptr = OpaqueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") -FSSpec = OpaqueByValueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") +FSSpec = OpaqueByValueStructType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") FSRef_ptr = OpaqueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") -FSRef = OpaqueByValueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") +FSRef = OpaqueByValueStructType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") # OSType and ResType: 4-byte character strings def OSTypeType(typename): |