fixed pybind::call value policy

This commit is contained in:
Wenzel Jakob 2015-10-02 09:33:53 +02:00
parent 6a32620db3
commit edbdef7ccf

View File

@ -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)