- 09 Feb, 2021 40 commits
-
-
Pure renaming of function and variable names, for better generalization when convoluting with inheritance. NO functional changes.
Ralf W. Grosse-Kunstleve committed -
Pure renaming of function names in test_classh_inheritance, similar to the systematic approach used in test_class_wip. NO functional changes.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Removing stray isinstance<T>(src): it interferes with the py::module_local feature. Adding missing #includes.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
First pass adjusting try_implicit_casts and try_load_foreign_module_local to capture loaded_v_h, but untested and guarded with pybind11_failure("Untested"). This was done mainly to determine general feasibility. Note the TODO in pybind11.h, where type_caster_generic::local_load is currently hard-coded. test_classh_wip and test_classh_inheritance still pass, as before.Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Folding in modified_type_caster_generic_load_impl, just enough to pass test_class_wip. test_classh_inheritance is still failing, but with a different error: [RuntimeError: Incompatible type (as_raw_ptr_unowned).]
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Copying classh type_casters from test_classh_wip.cpp UNMODIFIED, as a baseline for generalizing the code.
Ralf W. Grosse-Kunstleve committed -
Moving factored-out make_constructor to test_classh_wip.cpp, restoring previous version of cast.h. This is currently the most practical approach. See PR #2798 for background.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Adding minor comment (change to internals needed to distinguish uninitialized/disowned in error message).
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Using type_caster_base<mpty>::src_and_type directly, removing copy. Also renaming one cast to cast_const_raw_ptr, for clarity.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Open question, with respect to the original code: https://github.com/pybind/pybind11/blob/76a160070b369f8d82b945c97924227e8b835c94/include/pybind11/pybind11.h#L1510 To me it looks like the exact situation marked as `std::shared_ptr<Good> gp1 = not_so_good.getptr();` here: https://en.cppreference.com/w/cpp/memory/enable_shared_from_this The comment there is: `// undefined behavior (until C++17) and std::bad_weak_ptr thrown (since C++17)` Does the existing code have UB pre C++17? I'll leave handling of enable_shared_from_this for later, as the need arises.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
See new bullet point in comment section near the top. The variable was also renamed to reflect its function more accurately.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Copying type_caster_generic::cast into type_caster<mpty> as-is (preparation for handling smart pointers).
Ralf W. Grosse-Kunstleve committed -
static cast handle for rtrn_valu works by simply dropping in code from type_caster_base (marked with comments). rtrn_rref raises a RuntimeError, to be investigated.
Ralf W. Grosse-Kunstleve committed -
static cast handle for rtrn_cref works by simply dropping in code from type_caster_base (marked with comments). rtrn_mref and rtrn_mptr work via const_cast (to add const).
Ralf W. Grosse-Kunstleve committed -
static cast handle for rtrn_cptr works by simply dropping in code from type_caster_base (marked with comments).
Ralf W. Grosse-Kunstleve committed -
Systematically setting mtxt for all rtrn_mpty_* functions (preparation, the values are not actually used yet).
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-