another simplification after Dag's cleanup
authorStefan Behnel <scoder@users.berlios.de>
Thu, 27 Nov 2008 13:37:06 +0000 (14:37 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 27 Nov 2008 13:37:06 +0000 (14:37 +0100)
Cython/Compiler/UtilNodes.py

index 58592117726454683a89e23f8b4cbe1b248ab040..3563d49069b348062fad9b44fd900728bc1303eb 100644 (file)
@@ -79,9 +79,8 @@ class TempsBlockNode(Node):
 
     def generate_execution_code(self, code):
         for handle in self.temps:
-            managed = handle.needs_cleanup or not handle.type.is_pyobject
             handle.temp = code.funcstate.allocate_temp(
-                handle.type, manage_ref=managed)
+                handle.type, manage_ref=handle.needs_cleanup)
         self.body.generate_execution_code(code)
         for handle in self.temps:
             if handle.needs_cleanup: