]> git.cworth.org Git - apitrace/commitdiff
Add Function.argNames() method.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 15 Jan 2012 13:57:03 +0000 (13:57 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 15 Jan 2012 13:57:03 +0000 (13:57 +0000)
glretrace.py
specs/stdapi.py

index bed1138e425e1a5d34c5e7e44d93e26d8f4647b9..15ba092a61d009ebd2f0fc60a0a5d202809d94d4 100644 (file)
@@ -369,12 +369,12 @@ class GlRetracer(Retracer):
             return
 
         if arg.type is glapi.GLlocation \
-           and 'program' not in [arg.name for arg in function.args]:
+           and 'program' not in function.argNames():
             print '    GLint program = -1;'
             print '    glGetIntegerv(GL_CURRENT_PROGRAM, &program);'
         
         if arg.type is glapi.GLlocationARB \
-           and 'programObj' not in [arg.name for arg in function.args]:
+           and 'programObj' not in function.argNames():
             print '    GLhandleARB programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB);'
 
         Retracer.extractArg(self, function, arg, arg_type, lvalue, rvalue)
index b9d6c64f5c1d83c834e28b32f75fd893a2b0c7cc..35257a3571ffdacc71c86d666637f4393a4fff4c 100644 (file)
@@ -298,6 +298,9 @@ class Function:
         s += ")"
         return s
 
+    def argNames(self):
+        return [arg.name for arg in self.args]
+
 
 def StdFunction(*args, **kwargs):
     kwargs.setdefault('call', '__stdcall')