class String(Type):
- def __init__(self, expr = "char *", length = None):
+ def __init__(self, expr = "char *", length = None, kind = 'String'):
Type.__init__(self, expr)
self.length = length
+ self.kind = kind
def visit(self, visitor, *args, **kwargs):
return visitor.visitString(self, *args, **kwargs)
-# C string (i.e., zero terminated)
-CString = String()
-
class Opaque(Type):
'''Opaque pointer.'''
Float = Literal("float", "Float")
Double = Literal("double", "Double")
SizeT = Literal("size_t", "UInt")
-WString = Literal("wchar_t *", "WString")
+
+# C string (i.e., zero terminated)
+CString = String()
+WString = String("wchar_t *", kind="WString")
Int8 = Literal("int8_t", "SInt")
UInt8 = Literal("uint8_t", "UInt")