fix for memory leak when using keyword-only arguments
authorStefan Behnel <scoder@users.berlios.de>
Wed, 19 Dec 2007 10:51:57 +0000 (11:51 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 19 Dec 2007 10:51:57 +0000 (11:51 +0100)
Cython/Compiler/Nodes.py

index ba3e74cedfc33e38b0e3a258fb36727744f132e2..a7347e62c3bc6604bec782bed19dbe40fdd58214 100644 (file)
@@ -1251,7 +1251,7 @@ class DefNode(FuncDefNode):
                 code.putln(error_return_code)
 
     def put_stararg_decrefs(self, code):
-        if self.star_arg or self.starstar_arg:
+        if self.star_arg or self.starstar_arg or self.num_kwonly_args > 0:
             code.put_xdecref(Naming.args_cname, py_object_type)
             code.put_xdecref(Naming.kwds_cname, py_object_type)