Small cleanup/refactoring in support of PR #5213 #5251
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
See PR #5213 for the context from which these changes originate:
commit 5e30064:
Factor out detail/value_and_holder.h (from detail/type_caster_base.h).
This is in support of PR #5213:
trampoline_self_life_support.h depends on value_and_holder.h
type_caster_base.h depends on trampoline_self_life_support.h
commit 54fd559:
copyable_holder_caster: the correctload_value()return type isvoid(as defined intype_caster_generic).For easy future reference, this is the long-standing inconsistency:
pybind11/include/pybind11/detail/type_caster_base.h
Line 634 in dbf848a
pybind11/include/pybind11/cast.h
Line 797 in dbf848a
Noticed in passing while working on PR #5213.
commit 92d7724:
DANGER ZONEcomment in detail/init.h, similar to a comment added on the smart_holder branch (all the way back in 2021).Suggested changelog entry: