-
Notifications
You must be signed in to change notification settings - Fork 738
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
Commits on May 28, 2024
-
Added
PyRef::as_super
andPyRefMut::as_super
methods, including d……ocstrings and tests. The implementation of these methods also required adding `#[repr(transparent)]` to the `PyRef` and `PyRefMut` structs.
Configuration menu - View commit details
-
Copy full SHA for 477fa6f - Browse repository at this point
Copy the full SHA 477fa6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d27b2d - Browse repository at this point
Copy the full SHA 6d27b2dView commit details -
Changed the
AsRef<U>
/AsMut<U>
impls forPyRef
andPyRefMut
to…… use the new `as_super` methods. Added the `PyRefMut::downgrade` associated function for converting `&PyRefMut` to `&PyRef`. Updated tests and docstrings to better demonstrate the new functionality.
Configuration menu - View commit details
-
Copy full SHA for 42d7ca9 - Browse repository at this point
Copy the full SHA 42d7ca9View commit details
Commits on May 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 189d92e - Browse repository at this point
Copy the full SHA 189d92eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6596cd6 - Browse repository at this point
Copy the full SHA 6596cd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c44d28 - Browse repository at this point
Copy the full SHA 8c44d28View commit details
Commits on Jun 8, 2024
-
Updated
PyRef::as_super
,PyRefMut::as_super
, and `PyRefMut::downg……rade` to use `.cast()` instead of `as _` pointer casts. Fixed typo.
Configuration menu - View commit details
-
Copy full SHA for 23c7836 - Browse repository at this point
Copy the full SHA 23c7836View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58a6ee7 - Browse repository at this point
Copy the full SHA 58a6ee7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e97b28a - Browse repository at this point
Copy the full SHA e97b28aView commit details -
Updated
PyRef::as_super
andPyRefMut::downgrade
to use `ptr_from_……ref` for the initial cast to `*const _` instead of `as _` casts.
Configuration menu - View commit details
-
Copy full SHA for 4e345f3 - Browse repository at this point
Copy the full SHA 4e345f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bef736 - Browse repository at this point
Copy the full SHA 6bef736View commit details -
Added
pyo3::internal_tricks::ptr_from_mut
function alongside the `p……tr_from_ref` added in PR PyO3#4240. Updated `PyRefMut::as_super` to use this method instead of `as *mut _`.
Configuration menu - View commit details
-
Copy full SHA for 9c32d77 - Browse repository at this point
Copy the full SHA 9c32d77View commit details -
Updated the user guide to recommend
as_super
for accessing the base…… class instead of `as_ref`, and updated the subsequent example/doctest to demonstrate this functionality.
Configuration menu - View commit details
-
Copy full SHA for 1d3e41a - Browse repository at this point
Copy the full SHA 1d3e41aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf4e872 - Browse repository at this point
Copy the full SHA bf4e872View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fc9143 - Browse repository at this point
Copy the full SHA 0fc9143View commit details -
Configuration menu - View commit details
-
Copy full SHA for f85c83a - Browse repository at this point
Copy the full SHA f85c83aView commit details