From: Stefan Behnel Date: Sun, 30 Nov 2008 12:04:13 +0000 (+0100) Subject: fix method signatures X-Git-Tag: 0.11-beta~174^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5fd59aa5baa26f013e031b72ec1e2b38d188ea00;p=cython.git fix method signatures --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 2996db4b..c6308492 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -3219,10 +3219,12 @@ class DictItemNode(ExprNode): def generate_evaluation_code(self, code): self.key.generate_evaluation_code(code) self.value.generate_evaluation_code(code) - - def generate_disposal_code(self, code): - self.key.generate_disposal_code(code) - self.value.generate_disposal_code(code) + + def generate_disposal_code(self, code, free_temp=True, decref=True): + self.key.generate_disposal_code( + code, free_temp=free_temp, decref=decref) + self.value.generate_disposal_code( + code, free_temp=free_temp, decref=decref) def __iter__(self): return iter([self.key, self.value]) @@ -4765,7 +4767,7 @@ class CloneNode(CoercionNode): def generate_result_code(self, code): pass - def generate_disposal_code(self, code): + def generate_disposal_code(self, code, free_temp=True, decref=True): pass def allocate_temps(self, env): @@ -4811,9 +4813,9 @@ class PersistentNode(ExprNode): self.arg.generate_disposal_code(code) self.generate_counter += 1 - def generate_disposal_code(self, code): + def generate_disposal_code(self, code, free_temp=True, decref=True): if self.generate_counter == self.uses: - if self.type.is_pyobject: + if self.type.is_pyobject and decref: code.put_decref_clear(self.result(), self.ctype()) def allocate_temps(self, env, result=None):