X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fstdapi.py;h=6aa4089f6d0984880f475bf57a87d75fc0d2cd5e;hb=ee659c84695e9f94b1f6a5f8be203dc0012ca685;hp=5ba621fff35ceb7e26df9d94d0d303240d77e68c;hpb=280a176f599484b3acf75f070e3f25b756786cc2;p=apitrace diff --git a/specs/stdapi.py b/specs/stdapi.py index 5ba621f..6aa4089 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -350,13 +350,28 @@ class Interface(Type): yield method raise StopIteration + def iterBaseMethods(self): + if self.base is not None: + for iface, method in self.base.iterBaseMethods(): + yield iface, method + for method in self.methods: + yield self, method + raise StopIteration + class Method(Function): - def __init__(self, type, name, args): + def __init__(self, type, name, args, const=False): Function.__init__(self, type, name, args, call = '__stdcall') for index in range(len(self.args)): self.args[index].index = index + 1 + self.const = const + + def prototype(self, name=None): + s = Function.prototype(self, name) + if self.const: + s += ' const' + return s class String(Type):