Skip to content

Commit 9c67d8c

Browse files
Bump pybind11
1 parent e29a312 commit 9c67d8c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

pybind11

Submodule pybind11 updated 219 files

source/typecast.hh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ struct smart_holder_type_caster_disown_load {
7272

7373
if (self_life_support != nullptr) {
7474
self_life_support->activate_life_support(load_impl.loaded_v_h);
75+
} else {
76+
load_impl.loaded_v_h.value_ptr() = nullptr;
77+
deregister_instance(load_impl.loaded_v_h.inst, value_void_ptr, load_impl.loaded_v_h.type);
7578
}
7679

7780
return raw_type_ptr;
@@ -87,8 +90,10 @@ private:
8790
T *convert_type(void *void_ptr) const
8891
{
8992
if (void_ptr != nullptr && load_impl.loaded_v_h_cpptype != nullptr && !load_impl.reinterpret_cast_deemed_ok &&
90-
load_impl.implicit_cast != nullptr) {
91-
void_ptr = load_impl.implicit_cast(void_ptr);
93+
!load_impl.implicit_casts.empty()) {
94+
for (auto implicit_cast : load_impl.implicit_casts) {
95+
void_ptr = implicit_cast(void_ptr);
96+
}
9297
}
9398
return static_cast<T *>(void_ptr);
9499
}
@@ -98,7 +103,7 @@ template <typename T>
98103
struct smart_holder_type_caster<disown_ptr<T>> : smart_holder_type_caster_disown_load<T>,
99104
smart_holder_type_caster_class_hooks {
100105

101-
static constexpr auto name = _<T>();
106+
static constexpr auto name = const_name<T>();
102107

103108
static handle cast(disown_ptr<T> &&, return_value_policy, handle)
104109
{
@@ -119,7 +124,7 @@ struct smart_holder_type_caster<disown_ptr<T>> : smart_holder_type_caster_disown
119124
template <typename T>
120125
struct smart_holder_type_caster<disown_ptr<T const>> : smart_holder_type_caster_class_hooks {
121126

122-
static constexpr auto name = _<T>();
127+
static constexpr auto name = const_name<T>();
123128

124129
static handle cast(disown_ptr<T const> &&, return_value_policy, handle)
125130
{

0 commit comments

Comments
 (0)