Skip to content

Commit b349e84

Browse files
committed
Add comment for force_potentially_slicing_shared_ptr in type_caster_base.h, to make a direct connection py::potentially_slicing_weak_ptr
1 parent 9f379ea commit b349e84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/pybind11/detail/type_caster_base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,8 @@ struct load_helper : value_and_holder_helper {
760760

761761
std::shared_ptr<T> load_as_shared_ptr(void *void_raw_ptr,
762762
handle responsible_parent = nullptr,
763+
// to support py::potentially_slicing_weak_ptr
764+
// with minimal added code complexity:
763765
bool force_potentially_slicing_shared_ptr
764766
= false) const {
765767
if (!have_holder()) {

0 commit comments

Comments
 (0)