From: José Fonseca Date: Sun, 15 Jan 2012 13:57:03 +0000 (+0000) Subject: Add Function.argNames() method. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=568ecc29ff1a22d8ad059bade28ac79728b92958;hp=fb3bd60273e8657ba0eff6b0fa1a322167c2d2f6;p=apitrace Add Function.argNames() method. --- diff --git a/glretrace.py b/glretrace.py index bed1138..15ba092 100644 --- a/glretrace.py +++ b/glretrace.py @@ -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) diff --git a/specs/stdapi.py b/specs/stdapi.py index b9d6c64..35257a3 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -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')