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

Fix TargetList::new implementation #622

Merged
merged 1 commit into from Feb 10, 2018

Conversation

Projects
None yet
3 participants
@EPashkin
Member

EPashkin commented Feb 8, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 8, 2018

Less code, seems like a good thing to me. :)

@sdroege

This comment has been minimized.

Member

sdroege commented Feb 8, 2018

👍

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 8, 2018

@sdroege There strange gio-related error on travis added in gtk-rs/gio#78

error[E0433]: failed to resolve. Could not find `windows` in `os`
  --> /home/travis/.cargo/git/checkouts/gio-a4b825b310a073b9/37c2a08/src/socket.rs:18:14
   |
18 | use std::os::windows::io::{IntoRawSocket, FromRawSocket};
   |              ^^^^^^^ Could not find `windows` in `os`

...

The command "cargo doc --features "dox"" exited with 101.
@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 8, 2018

Oh, it on doc building, gio don't have it so we missed.
Seems we need declare fake traits IntoRawSocket, FromRawSocket in case dox and not windows?

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 8, 2018

Maybe there's a way to make gir directly generate this as well?

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 8, 2018

cc @GuillaumeGomez as it doc related

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 8, 2018

Gir generated functions with wrong array type

impl TargetList {
    pub fn new(targets: &[&TargetEntry]) -> TargetList {
        assert_initialized_main_thread!();
        let ntargets = targets.len() as u32;
        unsafe {
            from_glib_full(ffi::gtk_target_list_new(targets.to_glib_none().0, ntargets))
        }
    }
@sdroege

This comment has been minimized.

Member

sdroege commented Feb 8, 2018

Oh, it on doc building, gio don't have it so we missed.
Seems we need declare fake traits IntoRawSocket, FromRawSocket in case dox and not windows?

That seems annoying. I thought the point of dox was that it can build things for any platform

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 8, 2018

It should actually.

@EPashkin EPashkin referenced this pull request Feb 9, 2018

Merged

Fix doc build #80

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 9, 2018

@GuillaumeGomez please restart travis here

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 9, 2018

Yes sir!

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 10, 2018

@GuillaumeGomez This ready for merge

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 10, 2018

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 6a538d9 into gtk-rs:master Feb 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@EPashkin EPashkin deleted the EPashkin:fix_gtk_target_list_new branch Feb 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment