mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-11 17:00:34 +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:
@@ -32,7 +32,8 @@ public:
|
||||
raise_from(PyExc_SystemError, "src != nullptr but PyErr_Occurred()");
|
||||
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;
|
||||
}
|
||||
if (policy == return_value_policy::reference
|
||||
|
||||
Reference in New Issue
Block a user