1. Mar 24, 2023
    • Ralf W. Grosse-Kunstleve's avatar
      [smart_holder] Enable properties for non-owning holders (#4586) · 37d0bf42
      Ralf W. Grosse-Kunstleve authored
      * Add test_class_sh_property_non_owning.cpp,py
      
      Failing:
      
      ```
      __________________________________________________________ test_persistent_holder __________________________________________________________
      
          def test_persistent_holder():
              h = m.DataFieldsHolder(2)
      >       c = h.vec_at(0).core_fld
      E       RuntimeError: Non-owning holder (loaded_as_shared_ptr).
      
      h          = <pybind11_tests.class_sh_property_non_owning.DataFieldsHolder object at 0x7fabab516470>
      
      test_class_sh_property_non_owning.py:6: RuntimeError
      __________________________________________________________ test_temporary_holder ___________________________________________________________
      
          def test_temporary_holder():
              d = m.DataFieldsHolder(2).vec_at(1)
      >       c = d.core_fld
      E       RuntimeError: Non-owning holder (loaded_as_shared_ptr).
      
      d          = <pybind11_tests.class_sh_property_non_owning.DataField object at 0x7fabab548770>
      
      test_class_sh_property_non_owning.py:13: RuntimeError
      ```
      
      * Introduce `shared_ptr_from_python(responsible_parent)` and use in all `property_cpp_function`s with `const shared_ptr<T> &` arguments.
      
      Tests are incomplete.
      
      * Complete tests.
      
      * Add comment for `smart_holder_type_caster_load<T>::shared_ptr_from_python`
      37d0bf42
  2. Mar 17, 2023
  3. Mar 10, 2023
  4. Mar 07, 2023
  5. Mar 01, 2023
  6. Feb 23, 2023
  7. Feb 22, 2023
  8. Feb 21, 2023
  9. Feb 18, 2023
  10. Feb 17, 2023
  11. Feb 16, 2023
  12. Feb 10, 2023
  13. Feb 08, 2023
  14. Feb 07, 2023
  15. Feb 06, 2023
  16. Feb 05, 2023
  17. Feb 02, 2023