Commit 5998c057 authored by Stefan Behnel's avatar Stefan Behnel

xdecref cleanup of star args only when required

parent 4f25bcf9
......@@ -1352,6 +1352,7 @@ class DefNode(FuncDefNode):
nargs,
star_arg_addr,
self.error_value()))
self.star_arg.entry.xdecref_cleanup = 0
elif self.entry.signature.has_generic_args:
# make sure supernumerous positional arguments do not run
# into keyword-only arguments and provide a more helpful
......@@ -1373,6 +1374,7 @@ class DefNode(FuncDefNode):
Naming.kwdlist_cname,
self.arg_address(self.starstar_arg),
self.reqd_kw_flags_cname))
self.starstar_arg.entry.xdecref_cleanup = 0
elif self.num_required_kw_args:
handle_error = 1
code.put("if (unlikely(__Pyx_CheckRequiredKeywords(%s, %s, %s) < 0)) " % (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment