From 5b6991af9ce85da0ae37dcd593e0341c82335f21 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Fri, 28 Jun 2019 20:25:18 +0200 Subject: [PATCH] Bump gir version --- rust-bindings/rust/Makefile | 2 +- rust-bindings/rust/src/auto/async_progress.rs | 12 ++++++------ rust-bindings/rust/src/auto/repo.rs | 9 ++++----- rust-bindings/rust/src/auto/repo_finder.rs | 6 +++--- rust-bindings/rust/src/auto/sysroot.rs | 12 +++++------- rust-bindings/rust/src/auto/versions.txt | 2 +- rust-bindings/rust/sys/src/auto/versions.txt | 2 +- 7 files changed, 21 insertions(+), 24 deletions(-) diff --git a/rust-bindings/rust/Makefile b/rust-bindings/rust/Makefile index 25124814..1e598acf 100644 --- a/rust-bindings/rust/Makefile +++ b/rust-bindings/rust/Makefile @@ -5,7 +5,7 @@ all: gir # -- gir generation -- target/tools/bin/gir: - cargo install --root target/tools --git https://github.com/gtk-rs/gir.git --rev f511aaeee8a324dc8d23b7a854121739b9bfcd2e -- gir + cargo install --root target/tools --git https://github.com/gtk-rs/gir.git --rev 20feecf4fe8b4f3524715a0d4111f8c279666324 -- gir gir: target/tools/bin/gir target/tools/bin/gir -c conf/ostree-sys.toml diff --git a/rust-bindings/rust/src/auto/async_progress.rs b/rust-bindings/rust/src/auto/async_progress.rs index e8c666d8..f4374c2e 100644 --- a/rust-bindings/rust/src/auto/async_progress.rs +++ b/rust-bindings/rust/src/auto/async_progress.rs @@ -147,6 +147,12 @@ impl> AsyncProgressExt for O { } fn connect_changed(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn changed_trampoline(this: *mut ostree_sys::OstreeAsyncProgress, f: glib_sys::gpointer) + where P: IsA + { + let f: &F = &*(f as *const F); + f(&AsyncProgress::from_glib_borrow(this).unsafe_cast()) + } unsafe { let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, @@ -155,12 +161,6 @@ impl> AsyncProgressExt for O { } } -unsafe extern "C" fn changed_trampoline(this: *mut ostree_sys::OstreeAsyncProgress, f: glib_sys::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&AsyncProgress::from_glib_borrow(this).unsafe_cast()) -} - impl fmt::Display for AsyncProgress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "AsyncProgress") diff --git a/rust-bindings/rust/src/auto/repo.rs b/rust-bindings/rust/src/auto/repo.rs index 32ef40e7..ad7103fa 100644 --- a/rust-bindings/rust/src/auto/repo.rs +++ b/rust-bindings/rust/src/auto/repo.rs @@ -987,6 +987,10 @@ impl Repo { //} pub fn connect_gpg_verify_result(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn gpg_verify_result_trampoline(this: *mut ostree_sys::OstreeRepo, checksum: *mut libc::c_char, result: *mut ostree_sys::OstreeGpgVerifyResult, f: glib_sys::gpointer) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this), &GString::from_glib_borrow(checksum), &from_glib_borrow(result)) + } unsafe { let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"gpg-verify-result\0".as_ptr() as *const _, @@ -995,11 +999,6 @@ impl Repo { } } -unsafe extern "C" fn gpg_verify_result_trampoline(this: *mut ostree_sys::OstreeRepo, checksum: *mut libc::c_char, result: *mut ostree_sys::OstreeGpgVerifyResult, f: glib_sys::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &GString::from_glib_borrow(checksum), &from_glib_borrow(result)) -} - impl fmt::Display for Repo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Repo") diff --git a/rust-bindings/rust/src/auto/repo_finder.rs b/rust-bindings/rust/src/auto/repo_finder.rs index f8796716..7f67dc45 100644 --- a/rust-bindings/rust/src/auto/repo_finder.rs +++ b/rust-bindings/rust/src/auto/repo_finder.rs @@ -23,7 +23,7 @@ impl RepoFinder { //#[cfg(feature = "futures")] //#[cfg(any(feature = "v2018_6", feature = "dox"))] - //pub fn resolve_all_async_future(finders: &[RepoFinder], refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin> { + //pub fn resolve_all_async_future(finders: &[RepoFinder], refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin> { //use gio::GioFuture; //use fragile::Fragile; @@ -56,7 +56,7 @@ pub trait RepoFinderExt: 'static { //#[cfg(feature = "futures")] //#[cfg(any(feature = "v2018_6", feature = "dox"))] - //fn resolve_async_future(&self, refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin>; + //fn resolve_async_future(&self, refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin>; } impl> RepoFinderExt for O { @@ -67,7 +67,7 @@ impl> RepoFinderExt for O { //#[cfg(feature = "futures")] //#[cfg(any(feature = "v2018_6", feature = "dox"))] - //fn resolve_async_future(&self, refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin> { + //fn resolve_async_future(&self, refs: &[&CollectionRef], parent_repo: &Repo) -> Box_> + std::marker::Unpin> { //use gio::GioFuture; //use fragile::Fragile; diff --git a/rust-bindings/rust/src/auto/sysroot.rs b/rust-bindings/rust/src/auto/sysroot.rs index aee88eb7..0cb924cb 100644 --- a/rust-bindings/rust/src/auto/sysroot.rs +++ b/rust-bindings/rust/src/auto/sysroot.rs @@ -238,7 +238,7 @@ impl Sysroot { } #[cfg(feature = "futures")] - pub fn lock_async_future(&self) -> Box_> + std::marker::Unpin> { + pub fn lock_async_future(&self) -> Box_> + std::marker::Unpin> { use gio::GioFuture; use fragile::Fragile; @@ -351,6 +351,10 @@ impl Sysroot { #[cfg(any(feature = "v2017_10", feature = "dox"))] pub fn connect_journal_msg(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn journal_msg_trampoline(this: *mut ostree_sys::OstreeSysroot, msg: *mut libc::c_char, f: glib_sys::gpointer) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this), &GString::from_glib_borrow(msg)) + } unsafe { let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"journal-msg\0".as_ptr() as *const _, @@ -359,12 +363,6 @@ impl Sysroot { } } -#[cfg(any(feature = "v2017_10", feature = "dox"))] -unsafe extern "C" fn journal_msg_trampoline(this: *mut ostree_sys::OstreeSysroot, msg: *mut libc::c_char, f: glib_sys::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &GString::from_glib_borrow(msg)) -} - impl fmt::Display for Sysroot { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Sysroot") diff --git a/rust-bindings/rust/src/auto/versions.txt b/rust-bindings/rust/src/auto/versions.txt index d0752571..8fead170 100644 --- a/rust-bindings/rust/src/auto/versions.txt +++ b/rust-bindings/rust/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ f511aae) +Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/rust-bindings/rust/sys/src/auto/versions.txt b/rust-bindings/rust/sys/src/auto/versions.txt index d0752571..8fead170 100644 --- a/rust-bindings/rust/sys/src/auto/versions.txt +++ b/rust-bindings/rust/sys/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ f511aae) +Generated by gir (https://github.com/gtk-rs/gir @ 20feecf) from gir-files (https://github.com/gtk-rs/gir-files @ ???)