Skip to content
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

FWD pybind11 #5213

Closed
rwgk opened this issue Feb 11, 2023 · 0 comments
Closed

FWD pybind11 #5213

rwgk opened this issue Feb 11, 2023 · 0 comments

Comments

@rwgk
Copy link
Contributor

rwgk commented Feb 11, 2023

pybind/pybind11#5213

@rwgk rwgk closed this as completed Feb 11, 2023
rwgk pushed a commit to rwgk/pybind11clif that referenced this issue Jul 20, 2024
* Factor out detail/value_and_holder.h (from detail/type_caster_base.h)

This is in support of PR google#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 google#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).
rwgk pushed a commit to rwgk/pybind11clif that referenced this issue Jul 20, 2024
…st_class_sh_property_bakein) (google#5256)

Corresponding to PR google#5213 commit 3406be68772fa3fe20db10b9e149b65f2a18ecec

Reduced from use cases in the wild:

* `test_readonly_char6_member()`: https://github.com/pytorch/pytorch/blob/4410c44ae6fd8eb36f2358ac76f7d988ca7537c5/torch/csrc/cuda/Module.cpp#L961

* `test_readonly_const_char_ptr_member()`: https://github.com/facebookresearch/nle/blob/862a439a84f52abca94d1f744d57061da12c5831/include/permonst.h#L43
rwgk pushed a commit to rwgk/pybind11clif that referenced this issue Jul 23, 2024
…: 1. To avoid compiler warnings for unused code in the unnamed namespace. 2. To avoid clang-format changes. (google#5258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant