diff --git a/Cargo.lock b/Cargo.lock index 203bc93e2ac35df9b7551e79c2fc3ea26dcfbe87..c274c45f9f4aee945c08573c5aec225a344fc5c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -150,22 +150,21 @@ dependencies = [ [[package]] name = "glib" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glib-sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -176,10 +175,10 @@ version = "0.1.0" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-gen-test 0.1.0", - "gobject-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -195,9 +194,9 @@ version = "0.1.0" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "gir 0.0.1 (git+https://github.com/gtk-rs/gir)", - "glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gobject-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -206,11 +205,10 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -761,9 +759,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" "checksum gir 0.0.1 (git+https://github.com/gtk-rs/gir)" = "" "checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71" -"checksum glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e0be1b1432e227bcd1a9b28db9dc1474a7e7fd4227e08e16f35304f32d09b61" -"checksum glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615bef979b5838526aee99241afc80cfb2e34a8735d4bcb8ec6072598c18a408" -"checksum gobject-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70409d6405db8b1591602fcd0cbe8af52cd9976dd39194442b4c149ba343f86d" +"checksum glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740f7fda8dde5f5e3944dabdb4a73ac6094a8a7fdf0af377468e98ca93733e61" +"checksum glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3573351e846caed9f11207b275cd67bc07f0c2c94fb628e5d7c92ca056c7882d" +"checksum gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08475e4a08f27e6e2287005950114735ed61cec2cb8c1187682a5aec8c69b715" "checksum hprof 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17b42e67c01ef27237e424783538a0bc45721ecd53438fab5c3f8bbf5dfd8516" "checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" diff --git a/Cargo.toml b/Cargo.toml index 79b0118f08706dd04401360906206f3c542197e1..49d0337b8cd69cb888d7ded25e1e442c97616f43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,9 @@ test = false test-generated = [] [dependencies] -glib = "0.5.0" -glib-sys = "0.6.0" -gobject-sys = "0.6.0" +glib = "0.6.0" +glib-sys = "0.7.0" +gobject-sys = "0.7.0" libc = "0.2" proc-macro2 = {version = "0.4.8"} quote = { version="0.6" } @@ -36,8 +36,8 @@ syn = { git = 'https://github.com/dtolnay/syn' } cc = "1.0" [dev-dependencies] -glib-sys = "0.6.0" -gobject-sys = "0.6.0" +glib-sys = "0.7.0" +gobject-sys = "0.7.0" gobject-gen-test = { path = "./mixed_tests" } #ctest-sys = { path = "./mixed_tests/auto" } libc = "0.2" diff --git a/mixed_tests/Cargo.toml b/mixed_tests/Cargo.toml index c6928fe3f63660de0cb81ede18bec1a172763697..398baf90527b46cdc9c9eff9b03035d4da82db1c 100644 --- a/mixed_tests/Cargo.toml +++ b/mixed_tests/Cargo.toml @@ -7,9 +7,9 @@ git = "https://github.com/gtk-rs/gir" [dependencies] libc = "0.2" -glib-sys = "0.6.0" -gobject-sys = "0.6.0" -glib = "0.5.0" +glib-sys = "0.7.0" +gobject-sys = "0.7.0" +glib = "0.6.0" [dev-dependencies] shell-words = "0.1.0" diff --git a/src/gen/privatestatic.rs b/src/gen/privatestatic.rs index 8f64357c65b78ecd8f069bb46cabcb599284d2bc..9fe03ca70e3f0da202dacaa9c9aa0ba5fc34debc 100644 --- a/src/gen/privatestatic.rs +++ b/src/gen/privatestatic.rs @@ -320,7 +320,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>> Some(#vtable::init), instance_size as u32, Some(#instance_ffi::init), - gobject_ffi::GTypeFlags::empty() + 0 ); #add_instance_private @@ -352,7 +352,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>> Some(#vtable::init), 0, // instance_size None, // instance_init - gobject_ffi::GTypeFlags::empty() + 0 ) } } diff --git a/src/hir/property.rs b/src/hir/property.rs index 3239a6b58c96ab35cc25b10e67c936105d74f7ea..015cec69c6a5bf60b698f7f3cbb5143e0521fe5e 100644 --- a/src/hir/property.rs +++ b/src/hir/property.rs @@ -123,7 +123,7 @@ impl PropertyAttributes { pub fn flags(&self) -> GParamFlags { // let mut result = gobject_sys::G_PARAM_READABLE ^ gobject_sys::G_PARAM_READABLE; - let mut result = GParamFlags::empty(); + let mut result = 0; if self.readable { result |= gobject_sys::G_PARAM_READABLE; } @@ -162,8 +162,8 @@ impl PropertyAttributes { pub fn flags_tokens(&self) -> TokenStream { // gobject_ffi - let flags = self.flags().bits(); - quote!{ gobject_ffi::GParamFlags::from_bits(#flags).unwrap() } + let flags = self.flags(); + quote!{ #flags } } pub fn blurb(&self) -> &Option {