From: Dag Sverre Seljebotn Date: Thu, 27 Nov 2008 11:03:12 +0000 (+0100) Subject: Backed out changeset 56c6f2f22f4a X-Git-Tag: 0.11-beta~204 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42db8ab39c64695008d3c12e5660c319263b340d;p=cython.git Backed out changeset 56c6f2f22f4a --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index b6cba5f9..78fd7779 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1224,24 +1224,17 @@ class NameNode(AtomicExprNode): rhs.generate_post_assignment_code(code) def generate_acquire_buffer(self, rhs, code): + rhstmp = code.funcstate.allocate_temp(self.entry.type) buffer_aux = self.entry.buffer_aux bufstruct = buffer_aux.buffer_info_var.cname - - value_is_temp = rhs.is_temp - if value_is_temp: - rhstmp = rhs.result_as(self.ctype()) - else: - rhstmp = code.funcstate.allocate_temp(self.entry.type) - code.putln('%s = %s;' % (rhstmp, rhs.result_as(self.ctype()))) - code.put_incref(rhstmp, self.entry.type) + code.putln('%s = %s;' % (rhstmp, rhs.result_as(self.ctype()))) import Buffer Buffer.put_assign_to_buffer(self.result(), rhstmp, buffer_aux, self.entry.type, is_initialized=not self.lhs_of_first_assignment, pos=self.pos, code=code) - if not value_is_temp: - code.put_decref_clear(rhstmp, self.entry.type) - code.funcstate.release_temp(rhstmp) + code.putln("%s = 0;" % rhstmp) + code.funcstate.release_temp(rhstmp) def generate_deletion_code(self, code): if self.entry is None: