From af467ea1a61bbe294d9bd8bf89a9901525f4a8a3 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 6 Jul 2024 11:17:00 -0700 Subject: [PATCH] WIP --- include/pybind11/detail/type_caster_base.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index c3fa8fa34..3e35f5a87 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -1089,6 +1089,8 @@ public: v_h_helper.loaded_v_h = v_h; if (v_h_helper.have_holder()) { v_h_helper.throw_if_uninitialized_or_disowned_holder(typeid(cpptype)); + value = v_h_helper.holder().template as_raw_ptr_unowned(); + return; } } auto *&vptr = v_h.value_ptr();