Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Wrappers evolution #77

Merged
merged 8 commits into from
Nov 25, 2015
Merged

Wrappers evolution #77

merged 8 commits into from
Nov 25, 2015

Conversation

gkoz
Copy link
Member

@gkoz gkoz commented Nov 25, 2015

  • Add Refcounted wrapper.
  • Implement Object wrapper via Refcounted.
  • Change placement of the lifetime in ToGlibPtr for saner implementations.
  • Shift some implementations burden from generics to macros.
  • Upcasts are implicit now.

"Reformed" branches: gtk-rs/gdk#84 and gtk

gkoz added 7 commits November 21, 2015 12:33
The trait is implemented for types themselves now instead of references.
 * `Object` is based on `Refcounted` now.
 * Upcasts are implicit in `ToGlibPtr` implementations now removing the need to call `upcast`.
 * The `Upcast` trait is essentially a shorthand for the presence of the appropriate `ToGlibPtr` implementations.
 * `downcast_unchecked` is unsafe with its `assert` changed to `debug_assert`.
Add conversions to/from `ObjectRef`.
This simplifies `Downcast` bounds and implementation.
This was referenced Nov 25, 2015
@@ -1,6 +1,6 @@
language: rust
rust:
- beta
- nightly
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should just add beta too once and for all since it seems to work. Like this, all three stages will be tested. That's not very useful but whatever...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I guess there's no harm in having beta too.

@GuillaumeGomez
Copy link
Member

Except for build targets, all seems ok. That's a very impressive work, thanks a lot for this !

@GuillaumeGomez
Copy link
Member

Perfect, examples will need to be updated too. Wanna do it ?

@gkoz
Copy link
Member Author

gkoz commented Nov 25, 2015

I don't think examples are affected, the build breaks because the other two PRs and this one are mutually dependent.

@GuillaumeGomez
Copy link
Member

Ok, then let's merge ! :D

GuillaumeGomez added a commit that referenced this pull request Nov 25, 2015
@GuillaumeGomez GuillaumeGomez merged commit 114d2da into gtk-rs:master Nov 25, 2015
homu added a commit to gtk-rs/gir that referenced this pull request Nov 25, 2015
Wrappers evolution

Follows the changes in gtk-rs/glib#77
@gkoz gkoz mentioned this pull request Nov 25, 2015
@gkoz gkoz deleted the wrappers2 branch January 16, 2016 14:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants