]> git.cworth.org Git - apitrace/blobdiff - specs/stdapi.py
Merge branch 'master' into d2d
[apitrace] / specs / stdapi.py
index d9fd5455bbdf381d7dbcf008cc851f07f0a30764..0e3fe236154d554276f9bf986168b1029b08b9b3 100644 (file)
@@ -349,7 +349,7 @@ 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():
@@ -361,10 +361,17 @@ class Interface(Type):
 
 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):