From 5608b71e0987f9140353fc5a4535db642c5077a1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 22 Jan 2021 19:19:55 -0800 Subject: [PATCH] Removing stray isinstance(src): it interferes with the py::module_local feature. Adding missing #includes. --- include/pybind11/detail/classh_type_casters.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/detail/classh_type_casters.h b/include/pybind11/detail/classh_type_casters.h index d00543e5d..3c5033e53 100644 --- a/include/pybind11/detail/classh_type_casters.h +++ b/include/pybind11/detail/classh_type_casters.h @@ -1,7 +1,9 @@ #pragma once +#include "../cast.h" #include "../pytypes.h" #include "../smart_holder_poc.h" +#include "class.h" #include "common.h" #include "descr.h" #include "internals.h" @@ -224,8 +226,6 @@ struct smart_holder_type_caster_load { using holder_type = pybindit::memory::smart_holder; bool load(handle src, bool convert) { - if (!isinstance(src)) - return false; load_impl = modified_type_caster_generic_load_impl(typeid(T)); if (!load_impl.load(src, convert)) return false;