From: Dag Sverre Seljebotn Date: Sat, 28 Mar 2009 14:07:20 +0000 (+0100) Subject: DictNode, newtemps and so on X-Git-Tag: 0.12.alpha0~354 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=35a90d1ced92a27a3d4dd433e0191fb7acb4f3d9;p=cython.git DictNode, newtemps and so on --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index de29d53f..24e45c0a 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -3424,7 +3424,7 @@ class SetNode(NewTempExprNode): arg.free_temps(code) -class DictNode(ExprNode): +class DictNode(NewTempExprNode): # Dictionary constructor. # # key_value_pairs [DictItemNode] @@ -3492,19 +3492,11 @@ class DictNode(ExprNode): gil_message = "Constructing Python dict" - def allocate_temps(self, env, result = None): - # Custom method used here because key-value - # pairs are evaluated and used one at a time. - self.allocate_temp(env, result) - for item in self.key_value_pairs: - item.key.allocate_temps(env) - item.value.allocate_temps(env) - item.key.release_temp(env) - item.value.release_temp(env) - def generate_evaluation_code(self, code): # Custom method used here because key-value # pairs are evaluated and used one at a time. + code.mark_pos(self.pos) + self.allocate_temp_result(code) if self.type.is_pyobject: self.release_errors() code.putln(