Add new FromGlibPtrBorrow2 and FromGlibPtrBorrowMut2 traits#1788
Open
sdroege wants to merge 1 commit intogtk-rs:mainfrom
Open
Add new FromGlibPtrBorrow2 and FromGlibPtrBorrowMut2 traits#1788sdroege wants to merge 1 commit intogtk-rs:mainfrom
sdroege wants to merge 1 commit intogtk-rs:mainfrom
Conversation
sdroege
commented
Aug 12, 2025
| /// | ||
| /// For more information, refer to module level documentation. | ||
| // FIXME: Rename to FromGlibPtrBorrow once all users are gone | ||
| pub trait FromGlibPtrBorrow2<P>: Sized { |
Member
Author
There was a problem hiding this comment.
Should also implement this for &str, &GStr, &GStrPtr, &StrVRef and various other types. Also boxed derive etc.
669a3da to
d9c876d
Compare
These borrow more safely the underlying type and are supposed to replace the old FromGlibPtrBorrow trait once all users are gone, as well as the manual implementations for the trait functions which are deprecated now.
d9c876d to
cee787a
Compare
Member
|
I would just do the switch now, given that our next release if going to be a major one. So we can update all the bindings at once. |
Member
Author
|
I'm not sure yet if I really want this as part of this release. It requires quite a bit of generator changes, so maybe should wait until the new one is ready. |
This file contains hidden or 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
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.
These borrow more safely the underlying type and are supposed to replace the old FromGlibPtrBorrow trait once all users are gone, as well as the manual implementations for the trait functions which are deprecated now.