return value policy fix for functions returning std::shared_ptr<> (fixes #187)

This commit is contained in:
Wenzel Jakob 2016-04-30 22:41:05 +02:00
parent c4d7ccd8b0
commit ffd85b46d8

View File

@ -720,7 +720,7 @@ public:
static handle cast(const holder_type &src, return_value_policy policy, handle parent) {
return type_caster_generic::cast(
src.get(), policy, parent,
src.get(), return_value_policy::take_ownership, parent,
src.get() ? &typeid(*src.get()) : nullptr, &typeid(type),
&copy_constructor, &move_constructor, &src);
}