Commit 5c8fc43e authored by Stefan Behnel's avatar Stefan Behnel

fix usage of new manage_ref keyword for temp handles

parent 5c55c308
......@@ -79,7 +79,9 @@ class TempsBlockNode(Node):
def generate_execution_code(self, code):
for handle in self.temps:
handle.temp = code.funcstate.allocate_temp(handle.type, manage_ref=True)
managed = handle.needs_cleanup or not handle.type.is_pyobject
handle.temp = code.funcstate.allocate_temp(
handle.type, manage_ref=managed)
self.body.generate_execution_code(code)
for handle in self.temps:
if handle.needs_cleanup:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment