-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small cleanup/refactoring in support of PR #5213 #5251
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is in support of PR pybind#5213: * trampoline_self_life_support.h depends on value_and_holder.h * type_caster_base.h depends on trampoline_self_life_support.h
…ter`: the correct `load_value()` return type is `void` (as defined in `type_caster_generic`) For easy future reference, this is the long-standing inconsistency: * https://github.com/pybind/pybind11/blob/dbf848aff7c37ef8798bc9459a86193e28b1032f/include/pybind11/detail/type_caster_base.h#L634 * https://github.com/pybind/pybind11/blob/dbf848aff7c37ef8798bc9459a86193e28b1032f/include/pybind11/cast.h#L797 Noticed in passing while working on PR pybind#5213.
…d on the smart_holder branch (all the way back in 2021).
rwgk
added a commit
to rwgk/pybind11
that referenced
this pull request
Jul 18, 2024
…from smart_holder branch almost as-is. This ensures IWYU correctness in client code. The only change in trampoline_self_life_support.h is to replace `#include "detail/type_caster_base.h"` with "#include detail/value_and_holder.h".
rwgk
added a commit
to rwgk/pybind11
that referenced
this pull request
Jul 18, 2024
henryiii
approved these changes
Jul 18, 2024
Thanks @henryiii ! |
rwgk
added a commit
to rwgk/pybind11
that referenced
this pull request
Jul 19, 2024
…/value_and_holder.h"` in trampoline_self_life_support.h. This was made possible by PR pybind#5251.
henryiii
pushed a commit
that referenced
this pull request
Aug 13, 2024
* 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 * Fix a minor and inconsequential inconsistency in `copyable_holder_caster`: the correct `load_value()` return type is `void` (as defined in `type_caster_generic`) For easy future reference, this is the long-standing inconsistency: * https://github.com/pybind/pybind11/blob/dbf848aff7c37ef8798bc9459a86193e28b1032f/include/pybind11/detail/type_caster_base.h#L634 * https://github.com/pybind/pybind11/blob/dbf848aff7c37ef8798bc9459a86193e28b1032f/include/pybind11/cast.h#L797 Noticed in passing while working on PR #5213. * Add `DANGER ZONE` comment in detail/init.h, similar to a comment added on the smart_holder branch (all the way back in 2021).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ZONE
comment in detail/init.h, similar to a comment added on the smart_holder branch (all the way back in 2021).Suggested changelog entry: