]> git.cworth.org Git - apitrace/blobdiff - specs/stdapi.py
d3dretrace: Cope with _MAP_FLAG_DO_NOT_WAIT flags.
[apitrace] / specs / stdapi.py
index 930bb82b9be8a9eee0088178b9bda22bafb2fa00..c652736a8383e9156e5bd7e88af34dde79760382 100644 (file)
@@ -340,13 +340,7 @@ def InOut(type, name):
 
 class Function:
 
-    # 0-3 are reserved to memcpy, malloc, free, and realloc
-    __id = 4
-
     def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False):
-        self.id = Function.__id
-        Function.__id += 1
-
         self.type = type
         self.name = name
 
@@ -391,6 +385,12 @@ class Function:
     def argNames(self):
         return [arg.name for arg in self.args]
 
+    def getArgByName(self, name):
+        for arg in self.args:
+            if arg.name == name:
+                return arg
+        return None
+
 
 def StdFunction(*args, **kwargs):
     kwargs.setdefault('call', '__stdcall')