This adds a new property is_getter_method to the binder and adds a check when generating the method to automatically set the return value policy to reference_internal when the function returns a reference has the class has a Set<name> method.
Currently pybind returns a copy that must be set to apply any changes.
Builds on #26 .
This adds a new property
is_getter_method
to the binder and adds a check when generating the method to automatically set the return value policy toreference_internal
when the function returns a reference has the class has aSet<name>
method.Currently pybind returns a copy that must be set to apply any changes.
Eg:
Before this change I need to do:
With this change it's just