Commit edbdef7c by Wenzel Jakob

fixed pybind::call value policy

parent 6a32620d
...@@ -610,7 +610,7 @@ template <typename... Args> inline object handle::call(Args&&... args_) { ...@@ -610,7 +610,7 @@ template <typename... Args> inline object handle::call(Args&&... args_) {
const size_t size = sizeof...(Args); const size_t size = sizeof...(Args);
std::array<PyObject *, size> args{ std::array<PyObject *, size> args{
{ detail::type_caster<typename detail::decay<Args>::type>::cast( { detail::type_caster<typename detail::decay<Args>::type>::cast(
std::forward<Args>(args_), return_value_policy::automatic, nullptr)... } std::forward<Args>(args_), return_value_policy::reference, nullptr)... }
}; };
bool fail = false; bool fail = false;
for (auto result : args) for (auto result : args)
......
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