summaryrefslogtreecommitdiff
path: root/specs/stdapi.py
diff options
context:
space:
mode:
authorAndreas Hartmetz <ahartmetz@gmail.com>2013-07-12 11:37:35 +0200
committerAndreas Hartmetz <ahartmetz@gmail.com>2013-07-13 15:15:05 +0200
commitedea899194c441353943c22577bc22bf0e64d187 (patch)
tree50027149cf5cc1a9f63da399a8e66bd0d24e5203 /specs/stdapi.py
parent10cd0a53f61390cf211a54b3aa838ab1807487e4 (diff)
Allow float-based attrib_lists as found in WGL.
It also turns out that no "type" member is needed in AttribArray, so remove it.
Diffstat (limited to 'specs/stdapi.py')
-rw-r--r--specs/stdapi.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/specs/stdapi.py b/specs/stdapi.py
index 88711e1a..5cf1a37d 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