X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=stdapi.py;h=8852345884a69ce26b081a755201d9aa12e050bc;hb=ee2073911c1f76715427ef0c031bea7b8483ea97;hp=1dfe20036978351aea15221d3b5a27f419fddbe2;hpb=9ff7444f18b0709f38c88f3f956e386e9cab4630;p=apitrace diff --git a/stdapi.py b/stdapi.py index 1dfe200..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