Commit Graph

3 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve
6c922614ed
Adding reclaim_disowned logic & miscellaneous naming and documentation improvements. (#2943)
* Using new smart_holder::reclaim_disowned in smart_holder_type_caster for unique_ptr.

* Systematically renaming was_disowned to is_disowned (because disowning is now reversible: reclaim_disowned).

* Systematically renaming virtual_overrider_self_life_support to trampoline_self_life_support (to reuse existing terminology instead of introducing new one).

* Systematically renaming test_class_sh_with_alias to test_class_sh_trampoline_basic.

* Adding a Trampolines and std::unique_ptr section to README_smart_holder.rst.

* MSVC compatibility.
2021-04-09 23:08:44 -07:00
Ralf W. Grosse-Kunstleve
7eb6d6f695 Removing capsys.disable() in test_class_sh_disowning.py.
It was only useful for easily harvest this from the GitHub Actions CI results, mostly out of curiosity:

52 C++ function argument 1 is evaluated first.
90 C++ function argument 2 is evaluated first.

These results came for the final CI run for PR #2936; that PR has nothing else to do with the results.

Pushing directly. This tiny change is not worth a PR.

[skip actions]
2021-04-05 18:07:11 -07:00
Ralf W. Grosse-Kunstleve
08339d6331
Adding tests to exercise corner cases involving disowning. (#2912)
* Adding test_class_sh_disowning.

* Fixing minor namespace naming inconsistency between test_class_sh_*.cpp files.

* Replacing py::overload_cast with plain cast for C++11 compatibility.

* Accommodate that the C++ order of evaluation of function arguments is unspecified.
2021-03-22 12:16:29 -07:00