]> git.cworth.org Git - apitrace/blobdiff - specs/stdapi.py
Adjust D3D9's sideeffect settings.
[apitrace] / specs / stdapi.py
index d9fd5455bbdf381d7dbcf008cc851f07f0a30764..30a42df888794ba543fe3227c57896f0196eb757 100644 (file)
@@ -361,10 +361,17 @@ class Interface(Type):
 
 class Method(Function):
 
-    def __init__(self, type, name, args):
-        Function.__init__(self, type, name, args, call = '__stdcall')
+    def __init__(self, type, name, args, const=False, sideeffects=True):
+        Function.__init__(self, type, name, args, call = '__stdcall', sideeffects=sideeffects)
         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):