Commit 01e1bf59 authored by Stefan Behnel's avatar Stefan Behnel

another simplification after Dag's cleanup

parent eb1aba11
...@@ -79,9 +79,8 @@ class TempsBlockNode(Node): ...@@ -79,9 +79,8 @@ class TempsBlockNode(Node):
def generate_execution_code(self, code): def generate_execution_code(self, code):
for handle in self.temps: for handle in self.temps:
managed = handle.needs_cleanup or not handle.type.is_pyobject
handle.temp = code.funcstate.allocate_temp( handle.temp = code.funcstate.allocate_temp(
handle.type, manage_ref=managed) handle.type, manage_ref=handle.needs_cleanup)
self.body.generate_execution_code(code) self.body.generate_execution_code(code)
for handle in self.temps: for handle in self.temps:
if handle.needs_cleanup: 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