Skip to content
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

Don't require specific traits or namespaces in scope for the glib_wra… #398

Merged
merged 1 commit into from Nov 28, 2018

Conversation

Projects
None yet
3 participants
@sdroege
Copy link
Member

sdroege commented Nov 27, 2018

…pper! macro

This adds various unused use compiler warnings everywhere, and needs a gir fix for removing those. See gtk-rs/gir#671

}
res
}

unsafe fn from_glib_container_num_as_vec(ptr: *mut *mut $ffi_name, num: usize) -> Vec<Self> {
let res = $crate::translate::FromGlibContainerAsVec::from_glib_none_num_as_vec(ptr, num);
glib_ffi::g_free(ptr as *mut _);
$crate::ffi::g_free(ptr as *mut _);

This comment has been minimized.

@EPashkin

EPashkin Nov 27, 2018

Member

Seems this not works in other crates

This comment has been minimized.

@sdroege

sdroege Nov 27, 2018

Author Member

How does it fail where? :) was working for me in my tests

This comment has been minimized.

@EPashkin

EPashkin Nov 27, 2018

Member

See appveyour logs, I don't think that it fails in ffi::g_tls_file_database_get_type(),.

error[E0603]: module `ffi` is private
  --> C:\Users\appveyor\.cargo\git\checkouts\gio-a4b825b310a073b9\d1f28c4\src\auto\tls_file_database.rs:25:1
   |
25 | / glib_wrapper! {
26 | |     pub struct TlsFileDatabase(Object<ffi::GTlsFileDatabase, ffi::GTlsFileDatabaseInterface>): TlsDatabase;
27 | |
28 | |     match fn {
29 | |         get_type => || ffi::g_tls_file_database_get_type(),
30 | |     }
31 | | }
   | |_^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

also many errors in travis but its don't show from here it

error[E0603]: extern crate `ffi` is private
  --> <::glib::boxed::glib_boxed_wrapper macros>:78:24
   |
78 | let v_ptr = $ crate :: ffi :: g_malloc0 (
   |                        ^^^

This comment has been minimized.

@EPashkin

EPashkin Nov 27, 2018

Member

.. so my assumption that extern crate glib_sys as ffi; don't create exported or public module

This comment has been minimized.

@sdroege

sdroege Nov 27, 2018

Author Member

Ah right. This needs the boxed PR. That one is reexporting ffi

This comment has been minimized.

@EPashkin

EPashkin Nov 27, 2018

Member

I missed that you added pub to it and didn't understand why #[doc(hidden)] added

This comment has been minimized.

@EPashkin

EPashkin Nov 27, 2018

Member

.. now it make sense.
Then we wait until #397 merged

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 27, 2018

I restarted CIs.

@sdroege

This comment has been minimized.

Copy link
Member Author

sdroege commented Nov 28, 2018

@GuillaumeGomez all green, we can go ahead with this one at least :) gir fixes come afterwards to get rid of all the compiler warnings. Will be easier to catch them all once this is merged

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 28, 2018

Indeed, thanks!

@GuillaumeGomez GuillaumeGomez merged commit f45f516 into gtk-rs:master Nov 28, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.