- Jul 01, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
I did not go back to check when and why exactly this slipped in. Also removing unused `msg` (oversight in PR #3059).
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
* pickle setstate: setattr __dict__ only if not empty, to not force use of py::dynamic_attr() unnecessarily. * Adding unit test. * Clang 3.6 & 3.7 compatibility. * PyPy compatibility. * Minor iwyu fix, additional comment. * Addressing reviewer requests. * Applying clang-tidy suggested fixes. * Adding check_dynamic_cast_SimpleCppDerived, related to issue #3062.
-
- Jun 30, 2021
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Adding test_multiple_registered_instances_for_same_pointee_leak. Subtle changes in smart_holder_type_caster_load, trying to work on weak_ptr for shared_ptr_trampoline_self_life_support, but that didn't work out. Manually fully leak-checked again.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Completes unit test coverage for the changed code in smart_holder_type_casters.h.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
https://github.com/deepmind/open_spiel/tree/bbfb0259b5d26c1e3f05000f1f4a05b7ad60393e/open_spiel/python/mfg/algorithms best_response_value_test distribution_test fictitious_play_test greedy_policy_test nash_conv_test policy_value_test CAVEAT: The fix is NOT covered by pybind11 unit tests.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Revert "Updating Catch version to latest, in hopes of resolving the GHA download issue affecting all MSVC builds." This reverts commit f4e1112dc434d0505cecad6259113f0621ecba70. It didn't help.
-
Ralf W. Grosse-Kunstleve authored
Updating Catch version to latest, in hopes of resolving the GHA download issue affecting all MSVC builds.
-
Ralf W. Grosse-Kunstleve authored
-
-
Ralf W. Grosse-Kunstleve authored
Resolving TODOs for `from_unique_ptr` `void_cast_raw_ptr`. Adding test to exercise the path through `cast`. The path through init.h is missing a test that would fail if the flag is incorrect. The plan is to systematically cover all situations (there are many that are not exercised for shared_from_this).
-
Ralf W. Grosse-Kunstleve authored
Use casting to `void *` to evade to shared_from_this mechanism only if `pointee_depends_on_holder_owner`, but currently only for `from_raw_ptr_take_ownership`.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Simpler and safe implementation based on new requirement: C++ (outside of the Python object) needs to hold a shared_ptr before shared_from_this is called. This is more similar to the existing implementation on current smart_holder HEAD, but still uses a weak_ptr to always return the same shared_ptr as long as C++ does not let it expire.
-
Ralf W. Grosse-Kunstleve authored
smart_holder_poc.h: type-erase raw_ptr before passing to shared_ptr::reset, to not trigger populating the shared_from_this weak_ptr. This way the only way the weak_ptr is populated is through loaded_as_shared_ptr. Breaks all but one test in test_class_sh_trampoline_shared_from_this.py, now marked skip WIP to test everything else with the GitHub CI.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
The placeholder `vptr` is never exposed anymore, therefore the externally visible `use_count`s are more intuitive.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Adding `test_pass_released_shared_ptr_as_unique_ptr`, exercising new guard in smart_holder_type_casters.h.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Now also passes the open_spiel iterated_prisoners_dilemma_test ASAN clean, in addition to all pybind11 and PyCLIF unit tests. The problem was that calling `std::shared_ptr<void>::reset()` with a `void` pointer cannot possibly update the `shared_from_this` `weak_ptr`. The solution is to store a `shd_ptr_reset` function pointer in `guarded_deleter` (similar in idea to the stored function pointer for calling `delete`). This commit still includes all debugging code, i.e. is "dirty". The code will be cleaned up after the GitHub CI is fully successful.
-