X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fstdapi.py;h=5cf1a37def1295c08620014332487f5539298876;hb=edea899194c441353943c22577bc22bf0e64d187;hp=88711e1af10f713ad0f02c8f8e7d542e70701301;hpb=10cd0a53f61390cf211a54b3aa838ab1807487e4;p=apitrace diff --git a/specs/stdapi.py b/specs/stdapi.py index 88711e1..5cf1a37 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -272,12 +272,14 @@ class Array(Type): class AttribArray(Type): - def __init__(self, keyType, valueTypes, isConst = True, terminator = '0'): + def __init__(self, keyType, valueTypes, isConst = True, punType = None, terminator = '0'): + self.baseType = Int + if punType is not None: + self.baseType = punType if isConst: - Type.__init__(self, (Pointer(Const(Int))).expr) + Type.__init__(self, (Pointer(Const(self.baseType))).expr) else: - Type.__init__(self, (Pointer(Int)).expr) - self.type = (Pointer(Const(Int))) # for function prototypes and such + Type.__init__(self, (Pointer(self.baseType)).expr) self.keyType = keyType self.valueTypes = valueTypes self.terminator = terminator