diff options
Diffstat (limited to 'python/examples/refcounting/dietpass')
-rwxr-xr-x | python/examples/refcounting/dietpass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/examples/refcounting/dietpass b/python/examples/refcounting/dietpass index 9a7b0e8..9d6a77f 100755 --- a/python/examples/refcounting/dietpass +++ b/python/examples/refcounting/dietpass @@ -67,8 +67,10 @@ def ptr_exprs(name, ty): elif isinstance(ty, (BasicType, FunctionType)): return [] elif isinstance(ty, ArrayType): - # TODO - return [] + result = [] + for i in range(int(ty.length)): + result.extend(ptr_exprs(f"(({name})[{i}])", ty.base)) + return result else: print(ty.classify(), file=sys.stderr) raise NotImplementedError |