X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fstdapi.py;h=c74d3111bca9aae9659d99be97c6fa2db7285bb6;hb=9dd8f7079ebc7f203e86ecf7c7da58aec082c4ac;hp=51ee67482eac51eb1a45635e639c40462219235a;hpb=8b16dbd35ee2fa2a2a611300328c7c62a8805ea5;p=apitrace diff --git a/specs/stdapi.py b/specs/stdapi.py index 51ee674..c74d311 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -272,17 +272,12 @@ class Alias(Type): def visit(self, visitor, *args, **kwargs): return visitor.visitAlias(self, *args, **kwargs) - -def Out(type, name): - arg = Arg(type, name, output=True) - return arg - - class Arg: - def __init__(self, type, name, output=False): + def __init__(self, type, name, input=True, output=False): self.type = type self.name = name + self.input = input self.output = output self.index = None @@ -290,6 +285,16 @@ class Arg: return '%s %s' % (self.type, self.name) +def In(type, name): + return Arg(type, name, input=True, output=False) + +def Out(type, name): + return Arg(type, name, input=False, output=True) + +def InOut(type, name): + return Arg(type, name, input=True, output=True) + + class Function: # 0-3 are reserved to memcpy, malloc, free, and realloc