From: Robert Bradshaw Date: Thu, 30 Oct 2008 07:54:05 +0000 (-0700) Subject: Fix subtle error in new temp allocation. X-Git-Tag: 0.9.9.2.beta~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41ab9f0b7804b42d5e93408b6d6f25bec326819c;p=cython.git Fix subtle error in new temp allocation. --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 7d9dee5f..9603776e 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: