From 41ab9f0b7804b42d5e93408b6d6f25bec326819c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw <robertwb@math.washington.edu> Date: Thu, 30 Oct 2008 00:54:05 -0700 Subject: [PATCH] Fix subtle error in new temp allocation. --- Cython/Compiler/ExprNodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 7d9dee5fb..9603776e3 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -395,7 +395,7 @@ class ExprNode(Node): self.result_code = None if debug_temp_alloc: print("%s Allocated result %s" % (self, self.result_code)) - + def target_code(self): # Return code fragment for use as LHS of a C assignment. return self.calculate_result_code() @@ -599,7 +599,10 @@ class NewTempExprNode(ExprNode): assert result is None def release_temp(self, env): - pass + if self.is_temp: + pass + else: + self.release_subexpr_temps(env) def pre_generate_result_code(self, code): if self.is_temp: -- 2.30.9