-
Notifications
You must be signed in to change notification settings - Fork 778
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
Added as_super
methods to PyRef
and PyRefMut
.
#4219
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
477fa6f
Added `PyRef::as_super` and `PyRefMut::as_super` methods, including d…
JRRudy1 6d27b2d
Added newsfragment entry.
JRRudy1 42d7ca9
Changed the `AsRef<U>`/`AsMut<U>` impls for `PyRef` and `PyRefMut` to…
JRRudy1 189d92e
Fixed newsfragment filename.
JRRudy1 6596cd6
Removed unnecessary re-borrows flagged by clippy.
JRRudy1 8c44d28
retrigger checks
JRRudy1 23c7836
Updated `PyRef::as_super`, `PyRefMut::as_super`, and `PyRefMut::downg…
JRRudy1 58a6ee7
Merge branch 'PyO3:main' into pyref_as_super
JRRudy1 e97b28a
Merge remote-tracking branch 'origin/main' into pyref_as_super
JRRudy1 4e345f3
Updated `PyRef::as_super` and `PyRefMut::downgrade` to use `ptr_from_…
JRRudy1 6bef736
Merge remote-tracking branch 'origin/pyref_as_super' into pyref_as_super
JRRudy1 9c32d77
Added `pyo3::internal_tricks::ptr_from_mut` function alongside the `p…
JRRudy1 1d3e41a
Updated the user guide to recommend `as_super` for accessing the base…
JRRudy1 bf4e872
Improved tests for the `as_super` methods.
JRRudy1 0fc9143
Updated newsfragment to include additional changes.
JRRudy1 f85c83a
Fixed formatting.
JRRudy1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Added `as_super` methods to `PyRef` and `PyRefMut` for accesing the base class by reference | ||
- Updated user guide to recommend `as_super` for referencing the base class instead of `as_ref` | ||
- Added `pyo3::internal_tricks::ptr_from_mut` function for casting `&mut T` to `*mut T` |
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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to include docs changes or internal changes here, but as this PR is otherwise great let's just leave these points here and I'll tidy up during release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, I'll keep that in mind next time. Thanks for the merge!