You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix roundtrip unit test for derived Python objects
As expected, the unit test was failing because args were passed by-value
and not by reference. However, it wasn't possible to just change the policy
to reference or reference_internal.
reference gave errors, because const unique_ptr& only accepts reference_internal.
reference_internal gives an error, because the parent required for keep_alive is null.
Hence, I decided to introduce a new policy to explicitly indicate passing from
from Python to C++ via an overridden method. That's the cleanest solution to correctly
react to the special needs of this use case.
0 commit comments