Commit 48e1f9aa authored by Jason Rhinelander's avatar Jason Rhinelander
Browse files

Fix premature destruction of args/kwargs arguments

The `py::args` or `py::kwargs` arguments aren't properly referenced
when added to the function_call arguments list: their reference counts
drop to zero if the first (non-converting) function call fails, which
means they might be cleaned up before the second pass call runs.

This commit adds a couple of extra `object`s to the `function_call`
where we can stash a reference to them when needed to tie their
lifetime to the function_call object's lifetime.

(Credit to YannickJadoul for catching and proposing a fix in #1223).
parent 5e7591c6
Supports Markdown
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