X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fstdapi.py;fp=specs%2Fstdapi.py;h=b6bab8f542e2744ee642b3a7ffafa4663e05d9f1;hb=48412ffde3dd4710c96d5e8d9cfdf1789e4d703a;hp=44d4680a7e53467a8a464bddac2a2c63b2050416;hpb=7a6a32e2271a34d530c6914b0ad2bc95700f2cb2;p=apitrace diff --git a/specs/stdapi.py b/specs/stdapi.py index 44d4680..b6bab8f 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -349,14 +349,29 @@ class Interface(Type): for method in self.methods: 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):