mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
Add handling of return_value_policy::_clif_automatic
in type_caster_pyobject_ptr.h (backported from https://github.com/google/pywrapcc/pull/30021)
This commit is contained in:
parent
ba3d14d4c6
commit
bd69f7aaf2
@ -32,7 +32,8 @@ public:
|
|||||||
raise_from(PyExc_SystemError, "src != nullptr but PyErr_Occurred()");
|
raise_from(PyExc_SystemError, "src != nullptr but PyErr_Occurred()");
|
||||||
throw error_already_set();
|
throw error_already_set();
|
||||||
}
|
}
|
||||||
if (policy == return_value_policy::take_ownership) {
|
if (policy == return_value_policy::take_ownership
|
||||||
|
|| policy == return_value_policy::_clif_automatic) {
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
if (policy == return_value_policy::reference
|
if (policy == return_value_policy::reference
|
||||||
|
Loading…
Reference in New Issue
Block a user