X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glretrace.py;h=8f65b81a825a70d5c5cb918c3d6c61c6dd801321;hb=f12c6bcea97c445ef3805e40d06fd81672900895;hp=a9fb82cb341f79fc291f03044df749d423df861d;hpb=e6a50bd11a981afdb13501cb739b1666bbf444eb;p=apitrace diff --git a/glretrace.py b/glretrace.py index a9fb82c..8f65b81 100644 --- a/glretrace.py +++ b/glretrace.py @@ -132,12 +132,13 @@ def retrace_function(function): print 'static void retrace_%s(Trace::Call &call) {' % function.name success = True for arg in function.args: - arg.type = ConstRemover().visit(arg.type) - print ' %s %s;' % (arg.type, arg.name) + arg_type = ConstRemover().visit(arg.type) + print ' // %s -> %s' % (arg.type, arg_type) + print ' %s %s;' % (arg_type, arg.name) rvalue = 'call.arg("%s")' % (arg.name,) lvalue = arg.name try: - ValueExtractor().visit(arg.type, lvalue, rvalue) + ValueExtractor().visit(arg_type, lvalue, rvalue) except NotImplementedError: success = False print ' %s = 0; // FIXME' % arg.name @@ -152,11 +153,11 @@ def retrace_function(function): print ' %s(%s);' % (function.name, arg_names) for arg in function.args: if arg.output: - arg.type = ConstRemover().visit(arg.type) + arg_type = ConstRemover().visit(arg.type) rvalue = 'call.arg("%s")' % (arg.name,) lvalue = arg.name try: - ValueWrapper().visit(arg.type, lvalue, rvalue) + ValueWrapper().visit(arg_type, lvalue, rvalue) except NotImplementedError: print ' // FIXME: %s' % arg.name if function.type is not base.Void: