-
-
Notifications
You must be signed in to change notification settings - Fork 88
glib: glib-macros: add SharedType and Shared derive macro #452
Conversation
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.
Looks nice apart from that, thanks! :)
36e0256
to
5e4a39e
Compare
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.
Apart from the open comments this seems ready to me now
5e4a39e
to
1bb1375
Compare
1bb1375
to
d80d888
Compare
Let me know when the above discussions are all resolved and this is ready for a final review :) |
d80d888
to
b9f423a
Compare
@GuillaumeGomez @bilelmoussaoui What do you think? |
Should |
That would make sense, good point! |
Added a SharedType trait that allows implementing reference-counted types in terms os std::sync::Arc. In particular, the ffi methods that increment reference counting can return always the same pointer value. Also, added a `Shared` derive macro, similar to the existing `GBoxed` one, that simplifies the creation of Shared objects.
a282058
to
3c24a50
Compare
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.
Looks good to me, the name still seems a bit weird. Although, I don't think we can do any better if we want to keep the Boxed reference.
Added a SharedType trait that allows implementing reference-counted
types in terms os std::sync::Arc. In particular, the ffi methods that
increment reference counting can return always the same pointer value.
Also, added a
Shared
derive macro, similar to the existingGBoxed
one, that simplifies the creation of Shared objects.