mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-03 14:03:30 +08:00
return value policy fix for functions returning std::shared_ptr<> (fixes #187)
This commit is contained in:
parent
c4d7ccd8b0
commit
ffd85b46d8
@ -720,7 +720,7 @@ public:
|
|||||||
|
|
||||||
static handle cast(const holder_type &src, return_value_policy policy, handle parent) {
|
static handle cast(const holder_type &src, return_value_policy policy, handle parent) {
|
||||||
return type_caster_generic::cast(
|
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),
|
src.get() ? &typeid(*src.get()) : nullptr, &typeid(type),
|
||||||
©_constructor, &move_constructor, &src);
|
©_constructor, &move_constructor, &src);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user