From: Stefan Behnel Date: Wed, 23 Jan 2008 19:54:13 +0000 (+0100) Subject: xdecref cleanup of star args only when required (also in error cleanup code) X-Git-Tag: 0.9.6.14~29^2~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=100eec0657b1660dba4647d4477cd87ff6982c3a;p=cython.git xdecref cleanup of star args only when required (also in error cleanup code) --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index ffc4c63d..1d7c5692 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1313,10 +1313,13 @@ class DefNode(FuncDefNode): if has_star_or_kw_args: self.put_stararg_decrefs(code) self.generate_arg_decref(self.star_arg, code) - self.generate_arg_xdecref(self.starstar_arg, code) + if self.starstar_arg: + if self.starstar_arg.entry.xdecref_cleanup: + code.put_var_xdecref(self.starstar_arg.entry) + else: + code.put_var_decref(self.starstar_arg.entry) code.putln(error_return_code) code.put_label(end_label) - def put_stararg_decrefs(self, code): if self.star_arg: