diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2012-04-14 20:25:52 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2012-04-14 20:25:52 +0100 |
commit | 0075f154b6d764474d37085a582faee653d61cb5 (patch) | |
tree | 3f401e18be8827fcbf79ac0621d2b9152dedd3b6 /retrace/retrace.py | |
parent | 4f242f43bf4b3c8f5daadc4496c0e84ae55117b3 (diff) |
Properly (un)wrap array arguments.
Diffstat (limited to 'retrace/retrace.py')
-rw-r--r-- | retrace/retrace.py | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/retrace/retrace.py b/retrace/retrace.py index 369c13b4..8198b0a3 100644 --- a/retrace/retrace.py +++ b/retrace/retrace.py @@ -41,25 +41,6 @@ class UnsupportedType(Exception): pass -class MutableRebuilder(stdapi.Rebuilder): - '''Type visitor which derives a mutable type.''' - - def visitConst(self, const): - # Strip out const qualifier - return const.type - - def visitAlias(self, alias): - # Tear the alias on type changes - type = self.visit(alias.type) - if type is alias.type: - return alias - return type - - def visitReference(self, reference): - # Strip out references - return reference.type - - def lookupHandle(handle, value): if handle.key is None: return "__%s_map[%s]" % (handle.name, value) @@ -372,7 +353,7 @@ class Retracer: print ' (void)_allocator;' success = True for arg in function.args: - arg_type = MutableRebuilder().visit(arg.type) + arg_type = arg.type.mutable() print ' %s %s;' % (arg_type, arg.name) rvalue = 'call.arg(%u)' % (arg.index,) lvalue = arg.name @@ -393,7 +374,7 @@ class Retracer: def swizzleValues(self, function): for arg in function.args: if arg.output: - arg_type = MutableRebuilder().visit(arg.type) + arg_type = arg.type.mutable() rvalue = 'call.arg(%u)' % (arg.index,) lvalue = arg.name try: |