From c370d2387c6550fb2de08e5388c0698b30df5a99 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 27 Feb 2024 22:42:22 +0100 Subject: [PATCH] WIP: generate with fixed array params --- gdk-pixbuf/src/auto/versions.txt | 2 +- gdk-pixbuf/sys/versions.txt | 2 +- gio/src/auto/functions.rs | 4 ++-- gio/src/auto/versions.txt | 2 +- gio/sys/versions.txt | 2 +- gir | 2 +- glib/gobject-sys/versions.txt | 2 +- glib/src/auto/functions.rs | 6 +++--- glib/src/auto/versions.txt | 2 +- glib/sys/versions.txt | 2 +- graphene/src/auto/versions.txt | 2 +- graphene/sys/versions.txt | 2 +- pango/src/auto/versions.txt | 2 +- pango/sys/versions.txt | 2 +- pangocairo/src/auto/versions.txt | 2 +- pangocairo/sys/versions.txt | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gio/src/auto/functions.rs b/gio/src/auto/functions.rs index 48195c8d83ba..cfcf9da12da3 100644 --- a/gio/src/auto/functions.rs +++ b/gio/src/auto/functions.rs @@ -181,9 +181,9 @@ pub fn content_type_get_symbolic_icon(type_: &str) -> Icon { #[doc(alias = "g_content_type_guess")] pub fn content_type_guess( filename: Option>, - data: &[u8], + data: Option<&[u8]>, ) -> (glib::GString, bool) { - let data_size = data.len() as _; + let data_size = data.map(|arr| arr.len()).unwrap_or(0) as _; unsafe { let mut result_uncertain = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::g_content_type_guess( diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/gir b/gir index 9ebc44374393..cb94c81082f3 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 9ebc44374393a6555d68563e9df86da51417920d +Subproject commit cb94c81082f3140541c1865175c68a24d90581e0 diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/glib/src/auto/functions.rs b/glib/src/auto/functions.rs index fd6d1555671b..46f8ca740092 100644 --- a/glib/src/auto/functions.rs +++ b/glib/src/auto/functions.rs @@ -42,8 +42,8 @@ pub fn base64_decode(text: &str) -> Vec { //} #[doc(alias = "g_base64_encode")] -pub fn base64_encode(data: &[u8]) -> crate::GString { - let len = data.len() as _; +pub fn base64_encode(data: Option<&[u8]>) -> crate::GString { + let len = data.map(|arr| arr.len()).unwrap_or(0) as _; unsafe { from_glib_full(ffi::g_base64_encode(data.to_glib_none().0, len)) } } @@ -757,7 +757,7 @@ pub fn spawn_async( //#[cfg(feature = "v2_68")] //#[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] //#[doc(alias = "g_spawn_async_with_pipes_and_fds")] -//pub fn spawn_async_with_pipes_and_fds(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option>, stdin_fd: i32, stdout_fd: i32, stderr_fd: i32, source_fds: &[i32], target_fds: &[i32], n_fds: usize) -> Result<(Pid, i32, i32, i32), crate::Error> { +//pub fn spawn_async_with_pipes_and_fds(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option>, stdin_fd: i32, stdout_fd: i32, stderr_fd: i32, source_fds: Option<&[i32]>, target_fds: Option<&[i32]>, n_fds: usize) -> Result<(Pid, i32, i32, i32), crate::Error> { // unsafe { TODO: call ffi:g_spawn_async_with_pipes_and_fds() } //} diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index f85b15d2bb7c..056117c5be2e 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393) +Generated by gir (https://github.com/gtk-rs/gir @ 9ebc44374393+) from gir-files (https://github.com/gtk-rs/gir-files @ 4d83970797d4)