feat: move type_caster_base.h non-template definitions to type_caster_base-inl.h

Moves the free functions (type-info lookup and registration, instance
layout, isinstance_generic, cpp_conduit_method, type_info_description),
the loader_life_support members (the function-local thread_local stack
stays per-module in both modes), and the two heavy type_caster_generic
members (the type_info constructor and the main cast overload).
Templates, including load_impl<>, stay in the header.

Assisted-by: ClaudeCode:claude-fable-5
This commit is contained in:
Henry Schreiner
2026-08-17 00:50:35 -04:00
committed by Henry Schreiner
parent f8f4a9dfdf
commit 57b3abcbb7
6 changed files with 610 additions and 495 deletions
+2
View File
@@ -97,6 +97,7 @@ detail_headers = {
"include/pybind11/detail/native_enum_data.h",
"include/pybind11/detail/pybind11_namespace_macros.h",
"include/pybind11/detail/struct_smart_holder.h",
"include/pybind11/detail/type_caster_base-inl.h",
"include/pybind11/detail/type_caster_base.h",
"include/pybind11/detail/typeid.h",
"include/pybind11/detail/using_smart_holder.h",
@@ -132,6 +133,7 @@ pkgconfig_files = {
sdist_src_files = {
"src/class.cpp",
"src/internals.cpp",
"src/type_caster_base.cpp",
"src/pybind11_combined.cpp",
"src/pytypes.cpp",
}