Skip to content

refactor: replace .get_type with type::handle_of #2492

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

Merged
merged 3 commits into from
Sep 16, 2020

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Sep 16, 2020

Closes #2388, followup to #2364.

Added a handle_of, which returns a handle instead, so as not to introduce a lot of reference counting where we didn't have it before.

Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks interesting.

@henryiii
Copy link
Collaborator Author

@YannickJadoul 3.9 macOS segfault example. :/

Copy link
Collaborator

@YannickJadoul YannickJadoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, why not :-)

@henryiii henryiii merged commit 41aa926 into pybind:master Sep 16, 2020
@henryiii henryiii deleted the refactor/handle_of branch September 16, 2020 15:32
henryiii added a commit to henryiii/pybind11 that referenced this pull request Sep 17, 2020
This now tests the old form too, and fixes the bug introduced.
@henryiii henryiii mentioned this pull request Sep 17, 2020
henryiii added a commit to henryiii/pybind11 that referenced this pull request Sep 17, 2020
This now tests the old form too, and fixes the bug introduced.
henryiii added a commit to henryiii/pybind11 that referenced this pull request Sep 17, 2020
This now tests the old form too, and fixes the bug introduced.
henryiii added a commit that referenced this pull request Sep 17, 2020
This now tests the old form too, and fixes the bug introduced.
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

Successfully merging this pull request may close these issues.

refactor: Replace h.get_type() with py::type(h)
3 participants