X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=stdapi.py;h=8852345884a69ce26b081a755201d9aa12e050bc;hb=e0df952b67f3ae38aeb0fd7e32942f8fa53ac49f;hp=38f5db506cbbb1f725578a80b81354a56179912e;hpb=06aa2843155f2972963f08c8e88f611f6d2b7c6b;p=apitrace diff --git a/stdapi.py b/stdapi.py index 38f5db5..8852345 100644 --- a/stdapi.py +++ b/stdapi.py @@ -126,12 +126,8 @@ def ConstPointer(type): class Enum(Type): - __vid = 0 - def __init__(self, name, values): Type.__init__(self, name) - self.vid = Enum.__vid - Enum.__vid += len(values) self.values = list(values) def visit(self, visitor, *args, **kwargs): @@ -229,8 +225,12 @@ class Function: self.args = [] index = 0 for arg in args: - if isinstance(arg, tuple): - arg_type, arg_name = arg + if not isinstance(arg, Arg): + if isinstance(arg, tuple): + arg_type, arg_name = arg + else: + arg_type = arg + arg_name = "arg%u" % index arg = Arg(arg_type, arg_name) arg.index = index index += 1 @@ -566,7 +566,7 @@ UInt = Literal("unsigned int", "UInt") ULong = Literal("unsigned long", "UInt") ULongLong = Literal("unsigned long long", "UInt") Float = Literal("float", "Float") -Double = Literal("double", "Float") +Double = Literal("double", "Double") SizeT = Literal("size_t", "UInt") WString = Literal("wchar_t *", "WString")