diff --git a/include/pybind11/classh.h b/include/pybind11/classh.h deleted file mode 100644 index a4c5509f6..000000000 --- a/include/pybind11/classh.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "detail/classh_type_casters.h" -#include "smart_holder_poc.h" - -PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) - -using pybindit::memory::smart_holder; - -PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/include/pybind11/smart_holder_poc.h b/include/pybind11/detail/smart_holder_poc.h similarity index 100% rename from include/pybind11/smart_holder_poc.h rename to include/pybind11/detail/smart_holder_poc.h diff --git a/include/pybind11/detail/classh_type_casters.h b/include/pybind11/detail/smart_holder_type_casters.h similarity index 99% rename from include/pybind11/detail/classh_type_casters.h rename to include/pybind11/detail/smart_holder_type_casters.h index dd746021a..cd2e19efb 100644 --- a/include/pybind11/detail/classh_type_casters.h +++ b/include/pybind11/detail/smart_holder_type_casters.h @@ -2,11 +2,11 @@ #include "../cast.h" #include "../pytypes.h" -#include "../smart_holder_poc.h" #include "class.h" #include "common.h" #include "descr.h" #include "internals.h" +#include "smart_holder_poc.h" #include #include @@ -15,6 +15,9 @@ #include namespace pybind11 { + +using pybindit::memory::smart_holder; + namespace detail { inline std::pair find_existing_python_instance(void *src_void_ptr, diff --git a/include/pybind11/smart_holder.h b/include/pybind11/smart_holder.h new file mode 100644 index 000000000..fccc45ff1 --- /dev/null +++ b/include/pybind11/smart_holder.h @@ -0,0 +1,3 @@ +#pragma once + +#include "detail/smart_holder_type_casters.h" diff --git a/tests/classh_module_local_0.cpp b/tests/classh_module_local_0.cpp index 8a80711ed..fecf850cc 100644 --- a/tests/classh_module_local_0.cpp +++ b/tests/classh_module_local_0.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include diff --git a/tests/classh_module_local_1.cpp b/tests/classh_module_local_1.cpp index 3c5948a82..c38577178 100644 --- a/tests/classh_module_local_1.cpp +++ b/tests/classh_module_local_1.cpp @@ -1,6 +1,6 @@ // Identical to classh_module_local_2.cpp, except 2 replaced with 1. -#include #include +#include #include diff --git a/tests/classh_module_local_2.cpp b/tests/classh_module_local_2.cpp index 7316f3eeb..2d33b04a0 100644 --- a/tests/classh_module_local_2.cpp +++ b/tests/classh_module_local_2.cpp @@ -1,6 +1,6 @@ // Identical to classh_module_local_1.cpp, except 1 replaced with 2. -#include #include +#include #include diff --git a/tests/core/smart_holder_poc_test.cpp b/tests/core/smart_holder_poc_test.cpp index a4123b915..dab47bded 100644 --- a/tests/core/smart_holder_poc_test.cpp +++ b/tests/core/smart_holder_poc_test.cpp @@ -1,4 +1,4 @@ -#include "pybind11/smart_holder_poc.h" +#include "pybind11/detail/smart_holder_poc.h" #define CATCH_CONFIG_MAIN #include "catch.hpp" diff --git a/tests/test_classh_inheritance.cpp b/tests/test_classh_inheritance.cpp index 6f84202f6..ddaaefd51 100644 --- a/tests/test_classh_inheritance.cpp +++ b/tests/test_classh_inheritance.cpp @@ -1,6 +1,6 @@ #include "pybind11_tests.h" -#include +#include #include diff --git a/tests/test_classh_wip.cpp b/tests/test_classh_wip.cpp index 2b0a9bbcf..8a504f244 100644 --- a/tests/test_classh_wip.cpp +++ b/tests/test_classh_wip.cpp @@ -1,6 +1,6 @@ #include "pybind11_tests.h" -#include +#include #include #include diff --git a/tests/test_unique_ptr_member.cpp b/tests/test_unique_ptr_member.cpp index 071241701..89ff00a30 100644 --- a/tests/test_unique_ptr_member.cpp +++ b/tests/test_unique_ptr_member.cpp @@ -1,6 +1,6 @@ #include "pybind11_tests.h" -#include +#include #include