Skip to content

Don't skip Option for nullable collections #1728

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/pixbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl Pixbuf {
//}

//#[doc(alias = "gdk_pixbuf_save_to_callbackv")]
//pub fn save_to_callbackv<P: FnMut(&Vec<u8>, usize, &glib::Error) -> bool>(&self, save_func: P, type_: &str, option_keys: &[&str], option_values: &[&str]) -> Result<(), glib::Error> {
//pub fn save_to_callbackv<P: FnMut(&Vec<u8>, usize, &glib::Error) -> bool>(&self, save_func: P, type_: &str, option_keys: Option<&[&str]>, option_values: Option<&[&str]>) -> Result<(), glib::Error> {
// unsafe { TODO: call ffi:gdk_pixbuf_save_to_callbackv() }
//}

Expand Down
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
4 changes: 2 additions & 2 deletions gio/src/auto/app_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ pub trait AppInfoExt: IsA<AppInfo> + 'static {
#[doc(alias = "g_app_info_launch")]
fn launch(
&self,
files: &[File],
files: Option<&[File]>,
context: Option<&impl IsA<AppLaunchContext>>,
) -> Result<(), glib::Error> {
unsafe {
Expand All @@ -487,7 +487,7 @@ pub trait AppInfoExt: IsA<AppInfo> + 'static {
#[doc(alias = "g_app_info_launch_uris")]
fn launch_uris(
&self,
uris: &[&str],
uris: Option<&[&str]>,
context: Option<&impl IsA<AppLaunchContext>>,
) -> Result<(), glib::Error> {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/app_launch_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub trait AppLaunchContextExt: IsA<AppLaunchContext> + 'static {
fn startup_notify_id(
&self,
info: Option<&impl IsA<AppInfo>>,
files: &[File],
files: Option<&[File]>,
) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::g_app_launch_context_get_startup_notify_id(
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/dtls_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ pub trait DtlsConnectionExt: IsA<DtlsConnection> + 'static {
#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
#[doc(alias = "g_dtls_connection_set_advertised_protocols")]
#[doc(alias = "advertised-protocols")]
fn set_advertised_protocols(&self, protocols: &[&str]) {
fn set_advertised_protocols(&self, protocols: Option<&[&str]>) {
unsafe {
ffi::g_dtls_connection_set_advertised_protocols(
self.as_ref().to_glib_none().0,
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub fn content_type_is_unknown(type_: &str) -> bool {
#[cfg(feature = "v2_60")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
#[doc(alias = "g_content_type_set_mime_dirs")]
pub fn content_type_set_mime_dirs(dirs: &[&str]) {
pub fn content_type_set_mime_dirs(dirs: Option<&[&str]>) {
unsafe {
ffi::g_content_type_set_mime_dirs(dirs.to_glib_none().0);
}
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion gio/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion glib/gobject-sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
10 changes: 5 additions & 5 deletions glib/src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
//}

#[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)) }
}

Expand Down Expand Up @@ -711,7 +711,7 @@
pub fn spawn_async(
working_directory: Option<impl AsRef<std::path::Path>>,
argv: &[&std::path::Path],
envp: &[&std::path::Path],
envp: Option<&[&std::path::Path]>,
flags: SpawnFlags,
child_setup: Option<Box_<dyn FnOnce() + 'static>>,
) -> Result<Pid, crate::Error> {
Expand Down Expand Up @@ -756,7 +756,7 @@
//#[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<impl AsRef<std::path::Path>>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option<Box_<dyn FnOnce() + 'static>>, 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<impl AsRef<std::path::Path>>, argv: &[&std::path::Path], envp: Option<&[&std::path::Path]>, flags: SpawnFlags, child_setup: Option<Box_<dyn FnOnce() + 'static>>, 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() }
//}

Expand Down Expand Up @@ -817,7 +817,7 @@
//}

//#[doc(alias = "g_spawn_sync")]
//pub fn spawn_sync(working_directory: Option<impl AsRef<std::path::Path>>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option<&mut dyn (FnMut())>, standard_output: Vec<u8>, standard_error: Vec<u8>) -> Result<i32, crate::Error> {
//pub fn spawn_sync(working_directory: Option<impl AsRef<std::path::Path>>, argv: &[&std::path::Path], envp: Option<&[&std::path::Path]>, flags: SpawnFlags, child_setup: Option<&mut dyn (FnMut())>, standard_output: Vec<u8>, standard_error: Vec<u8>) -> Result<i32, crate::Error> {
// unsafe { TODO: call ffi:g_spawn_sync() }
//}

Expand Down
2 changes: 1 addition & 1 deletion glib/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion glib/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion graphene/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion graphene/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion pango/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion pango/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion pangocairo/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
2 changes: 1 addition & 1 deletion pangocairo/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ b2a1c6f9b362)
Generated by gir (https://github.com/gtk-rs/gir @ 9e6d0758f347)
from gir-files (https://github.com/gtk-rs/gir-files @ f5f1ab94657c)
Loading