From 100eec0657b1660dba4647d4477cd87ff6982c3a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 23 Jan 2008 20:54:13 +0100 Subject: [PATCH] xdecref cleanup of star args only when required (also in error cleanup code) --- Cython/Compiler/Nodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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: -- 2.26.2