From 59d37139a7de132621937c1cfd802ce8fa18cdf3 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 18:59:05 +0300 Subject: [PATCH 1/4] Update gir submodule --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index 55aec834..ae2fd079 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 55aec834ff61ac7b00812402b8af8abd834d5344 +Subproject commit ae2fd079f05b20f0ae79998cefbb2fa4508a2c01 From 6f65b97435c8c48853eaf795efd1bb67976cd926 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 18:59:32 +0300 Subject: [PATCH 2/4] Remove callback_guard in manual part --- src/application.rs | 1 - src/file.rs | 1 - src/input_stream.rs | 3 --- src/lib.rs | 6 ------ src/output_stream.rs | 2 -- src/pollable_input_stream.rs | 2 -- src/pollable_output_stream.rs | 2 -- src/socket.rs | 2 -- src/socket_listener.rs | 1 - src/subprocess.rs | 1 - 10 files changed, 21 deletions(-) diff --git a/src/application.rs b/src/application.rs index 1275e2dc..acc860b6 100644 --- a/src/application.rs +++ b/src/application.rs @@ -36,7 +36,6 @@ impl + IsA> ApplicationExtManual for O #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn open_trampoline

(this: *mut ffi::GApplication, files: *const *mut ffi::GFile, n_files: libc::c_int, hint: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &[File], &str) + 'static) = transmute(f); let files: Vec = FromGlibContainer::from_glib_none_num(files, n_files as usize); f(&Application::from_glib_none(this).downcast_unchecked(), &files, &String::from_glib_none(hint)) diff --git a/src/file.rs b/src/file.rs index 3c929bb6..b24fc260 100644 --- a/src/file.rs +++ b/src/file.rs @@ -38,7 +38,6 @@ impl + IsA + Clone + 'static> FileExtManual for O { let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), contents))); unsafe extern "C" fn replace_contents_async_trampoline + Send + 'static, R: FnOnce(Result<(B, String), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, contents) = user_data.take().unwrap(); let contents = *contents; diff --git a/src/input_stream.rs b/src/input_stream.rs index 734ae0c7..03891625 100644 --- a/src/input_stream.rs +++ b/src/input_stream.rs @@ -92,8 +92,6 @@ impl + IsA + Clone + 'static> InputStreamExtMa let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn read_all_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize, Option), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); - let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; @@ -129,7 +127,6 @@ impl + IsA + Clone + 'static> InputStreamExtMa let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn read_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; diff --git a/src/lib.rs b/src/lib.rs index 5e5acad2..eda39c55 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,12 +24,6 @@ extern crate futures_channel; #[cfg(feature = "futures")] extern crate futures_util; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - mod application; #[cfg(any(not(windows), feature = "dox"))] mod desktop_app_info; diff --git a/src/output_stream.rs b/src/output_stream.rs index 3e55aa5a..0c31c3f0 100644 --- a/src/output_stream.rs +++ b/src/output_stream.rs @@ -49,7 +49,6 @@ impl + IsA + Clone + 'static> OutputStreamExt let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn write_async_trampoline + Send + 'static, Q:FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; @@ -81,7 +80,6 @@ impl + IsA + Clone + 'static> OutputStreamExt let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn write_all_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize, Option), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; diff --git a/src/pollable_input_stream.rs b/src/pollable_input_stream.rs index 7f3d2ec5..43282182 100644 --- a/src/pollable_input_stream.rs +++ b/src/pollable_input_stream.rs @@ -105,7 +105,6 @@ impl + Clone + 'static> PollableInputStreamExtManual #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn trampoline>(stream: *mut ffi::GPollableInputStream, func: glib_ffi::gpointer) -> glib_ffi::gboolean { - callback_guard!(); let func: &SendCell glib::Continue + 'static>>> = transmute(func); let func = func.borrow(); let mut func = func.borrow_mut(); @@ -113,7 +112,6 @@ unsafe extern "C" fn trampoline>(stream: *mut ffi::G } unsafe extern "C" fn destroy_closure(ptr: glib_ffi::gpointer) { - callback_guard!(); Box:: glib::Continue + 'static>>>>::from_raw(ptr as *mut _); } diff --git a/src/pollable_output_stream.rs b/src/pollable_output_stream.rs index f874418d..6bc15449 100644 --- a/src/pollable_output_stream.rs +++ b/src/pollable_output_stream.rs @@ -90,7 +90,6 @@ impl + Clone + 'static> PollableOutputStreamExtManu #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn trampoline>(stream: *mut ffi::GPollableOutputStream, func: glib_ffi::gpointer) -> glib_ffi::gboolean { - callback_guard!(); let func: &SendCell glib::Continue + 'static>>> = transmute(func); let func = func.borrow(); let mut func = func.borrow_mut(); @@ -98,7 +97,6 @@ unsafe extern "C" fn trampoline>(stream: *mut ffi:: } unsafe extern "C" fn destroy_closure(ptr: glib_ffi::gpointer) { - callback_guard!(); Box:: glib::Continue + 'static>>>>::from_raw(ptr as *mut _); } diff --git a/src/socket.rs b/src/socket.rs index 279941a8..07d22dc3 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -258,7 +258,6 @@ impl + Clone + 'static> SocketExtManual for O { #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn trampoline>(socket: *mut ffi::GSocket, condition: glib_ffi::GIOCondition, func: glib_ffi::gpointer) -> glib_ffi::gboolean { - callback_guard!(); let func: &SendCell glib::Continue + 'static>>> = transmute(func); let func = func.borrow(); let mut func = func.borrow_mut(); @@ -266,7 +265,6 @@ unsafe extern "C" fn trampoline>(socket: *mut ffi::GSocket, condi } unsafe extern "C" fn destroy_closure(ptr: glib_ffi::gpointer) { - callback_guard!(); Box:: glib::Continue + 'static>>>>::from_raw(ptr as *mut _); } diff --git a/src/socket_listener.rs b/src/socket_listener.rs index 970eaad0..4c63bea0 100644 --- a/src/socket_listener.rs +++ b/src/socket_listener.rs @@ -31,7 +31,6 @@ impl + IsA + Clone + 'static> SocketListene let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn accept_socket_async_trampoline), Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut source_object = ptr::null_mut(); let res = ffi::g_socket_listener_accept_socket_finish(_source_object as *mut _, res, &mut source_object, &mut error); diff --git a/src/subprocess.rs b/src/subprocess.rs index aef9cfb6..800fc7c6 100644 --- a/src/subprocess.rs +++ b/src/subprocess.rs @@ -43,7 +43,6 @@ impl + IsA + Clone + 'static> Subproces let user_data: Box> = Box::new(Box::new((callback, stdin_buf))); unsafe extern "C" fn communicate_utf8_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut stdout_buf = ptr::null_mut(); let mut stderr_buf = ptr::null_mut(); From 15ce46439bbc08fdc8c3dc243dc582fb53f641c2 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 18:59:54 +0300 Subject: [PATCH 3/4] Regen --- src/auto/action.rs | 5 ----- src/auto/action_group.rs | 4 ---- src/auto/app_info.rs | 1 - src/auto/app_info_monitor.rs | 1 - src/auto/app_launch_context.rs | 2 -- src/auto/application.rs | 12 ------------ src/auto/application_command_line.rs | 4 ---- src/auto/buffered_input_stream.rs | 2 -- src/auto/buffered_output_stream.rs | 2 -- src/auto/bytes_icon.rs | 1 - src/auto/cancellable.rs | 1 - src/auto/charset_converter.rs | 3 --- src/auto/converter_input_stream.rs | 1 - src/auto/converter_output_stream.rs | 1 - src/auto/data_input_stream.rs | 4 ---- src/auto/data_output_stream.rs | 1 - src/auto/desktop_app_info.rs | 1 - src/auto/drive.rs | 9 --------- src/auto/emblem.rs | 2 -- src/auto/emblemed_icon.rs | 1 - src/auto/file.rs | 25 ------------------------- src/auto/file_icon.rs | 1 - src/auto/file_input_stream.rs | 1 - src/auto/file_io_stream.rs | 1 - src/auto/file_output_stream.rs | 1 - src/auto/filter_input_stream.rs | 1 - src/auto/filter_output_stream.rs | 1 - src/auto/functions.rs | 1 - src/auto/inet_address.rs | 12 ------------ src/auto/inet_address_mask.rs | 3 --- src/auto/inet_socket_address.rs | 4 ---- src/auto/input_stream.rs | 3 --- src/auto/io_stream.rs | 2 -- src/auto/loadable_icon.rs | 1 - src/auto/memory_output_stream.rs | 1 - src/auto/menu_model.rs | 1 - src/auto/mount.rs | 9 --------- src/auto/mount_operation.rs | 10 ---------- src/auto/network_address.rs | 3 --- src/auto/network_service.rs | 4 ---- src/auto/output_stream.rs | 4 ---- src/auto/permission.rs | 5 ----- src/auto/resolver.rs | 5 ----- src/auto/settings.rs | 10 ---------- src/auto/simple_action.rs | 5 ----- src/auto/socket.rs | 13 ------------- src/auto/socket_address.rs | 1 - src/auto/socket_address_enumerator.rs | 1 - src/auto/socket_client.rs | 14 -------------- src/auto/socket_connection.rs | 2 -- src/auto/socket_listener.rs | 3 --- src/auto/socket_service.rs | 2 -- src/auto/subprocess.rs | 5 ----- src/auto/subprocess_launcher.rs | 1 - src/auto/tcp_connection.rs | 1 - src/auto/themed_icon.rs | 3 --- src/auto/threaded_socket_service.rs | 2 -- src/auto/tls_certificate.rs | 5 ----- src/auto/tls_client_connection.rs | 4 ---- src/auto/tls_connection.rs | 11 ----------- src/auto/tls_database.rs | 3 --- src/auto/tls_file_database.rs | 1 - src/auto/tls_interaction.rs | 2 -- src/auto/tls_password.rs | 3 --- src/auto/tls_server_connection.rs | 1 - src/auto/unix_socket_address.rs | 3 --- src/auto/versions.txt | 2 +- src/auto/volume.rs | 5 ----- src/auto/zlib_compressor.rs | 3 --- src/auto/zlib_decompressor.rs | 2 -- 70 files changed, 1 insertion(+), 264 deletions(-) diff --git a/src/auto/action.rs b/src/auto/action.rs index 62ebff86..93cc03a8 100644 --- a/src/auto/action.rs +++ b/src/auto/action.rs @@ -177,35 +177,30 @@ impl + IsA> ActionExt for O { unsafe extern "C" fn notify_enabled_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_parameter_type_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_type_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/action_group.rs b/src/auto/action_group.rs index 01cdd4a2..df92c3d4 100644 --- a/src/auto/action_group.rs +++ b/src/auto/action_group.rs @@ -177,28 +177,24 @@ impl + IsA> ActionGroupExt for O { unsafe extern "C" fn action_added_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name)) } unsafe extern "C" fn action_enabled_changed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, enabled: glib_ffi::gboolean, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str, bool) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name), from_glib(enabled)) } unsafe extern "C" fn action_removed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name)) } unsafe extern "C" fn action_state_changed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, value: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str, &glib::Variant) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name), &from_glib_borrow(value)) } diff --git a/src/auto/app_info.rs b/src/auto/app_info.rs index ed313f8b..252f3acd 100644 --- a/src/auto/app_info.rs +++ b/src/auto/app_info.rs @@ -98,7 +98,6 @@ impl AppInfo { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn launch_default_for_uri_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_app_info_launch_default_for_uri_finish(res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/app_info_monitor.rs b/src/auto/app_info_monitor.rs index 02162f68..41ab8bb4 100644 --- a/src/auto/app_info_monitor.rs +++ b/src/auto/app_info_monitor.rs @@ -49,7 +49,6 @@ impl + IsA> AppInfoMonitorExt for O unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GAppInfoMonitor, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AppInfoMonitor::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/app_launch_context.rs b/src/auto/app_launch_context.rs index 6734dad2..3f0672cd 100644 --- a/src/auto/app_launch_context.rs +++ b/src/auto/app_launch_context.rs @@ -127,7 +127,6 @@ impl + IsA> AppLaunchContextExt f #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn launch_failed_trampoline

(this: *mut ffi::GAppLaunchContext, startup_notify_id: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&AppLaunchContext::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(startup_notify_id)) } @@ -135,7 +134,6 @@ where P: IsA { #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn launched_trampoline

(this: *mut ffi::GAppLaunchContext, info: *mut ffi::GAppInfo, platform_data: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &AppInfo, &glib::Variant) + 'static) = transmute(f); f(&AppLaunchContext::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(info), &from_glib_borrow(platform_data)) } diff --git a/src/auto/application.rs b/src/auto/application.rs index 92d59ba9..7f30d3f6 100644 --- a/src/auto/application.rs +++ b/src/auto/application.rs @@ -522,56 +522,48 @@ impl + IsA> ApplicationExt for O { unsafe extern "C" fn activate_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn command_line_trampoline

(this: *mut ffi::GApplication, command_line: *mut ffi::GApplicationCommandLine, f: glib_ffi::gpointer) -> libc::c_int where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &ApplicationCommandLine) -> i32 + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(command_line)) } unsafe extern "C" fn shutdown_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn startup_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_action_group_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_application_id_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_inactivity_timeout_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } @@ -579,28 +571,24 @@ where P: IsA { #[cfg(any(feature = "v2_44", feature = "dox"))] unsafe extern "C" fn notify_is_busy_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_registered_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_remote_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_resource_base_path_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/application_command_line.rs b/src/auto/application_command_line.rs index b701ce70..50ccc380 100644 --- a/src/auto/application_command_line.rs +++ b/src/auto/application_command_line.rs @@ -181,28 +181,24 @@ impl + IsA> ApplicationComm unsafe extern "C" fn notify_arguments_trampoline

(this: *mut ffi::GApplicationCommandLine, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ApplicationCommandLine::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_remote_trampoline

(this: *mut ffi::GApplicationCommandLine, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ApplicationCommandLine::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_options_trampoline

(this: *mut ffi::GApplicationCommandLine, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ApplicationCommandLine::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_platform_data_trampoline

(this: *mut ffi::GApplicationCommandLine, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ApplicationCommandLine::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/buffered_input_stream.rs b/src/auto/buffered_input_stream.rs index 92ce52ad..c619b5bf 100644 --- a/src/auto/buffered_input_stream.rs +++ b/src/auto/buffered_input_stream.rs @@ -83,7 +83,6 @@ impl + IsA + Clone + 'static> let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn fill_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_buffered_input_stream_fill_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; @@ -167,7 +166,6 @@ impl + IsA + Clone + 'static> unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GBufferedInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/buffered_output_stream.rs b/src/auto/buffered_output_stream.rs index da4ea05f..6c43b13c 100644 --- a/src/auto/buffered_output_stream.rs +++ b/src/auto/buffered_output_stream.rs @@ -99,14 +99,12 @@ impl + IsA> BufferedOutputStr unsafe extern "C" fn notify_auto_grow_trampoline

(this: *mut ffi::GBufferedOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedOutputStream::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GBufferedOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/bytes_icon.rs b/src/auto/bytes_icon.rs index be0d33d8..44ac0140 100644 --- a/src/auto/bytes_icon.rs +++ b/src/auto/bytes_icon.rs @@ -69,7 +69,6 @@ impl + IsA> BytesIconExt for O { #[cfg(any(feature = "v2_38", feature = "dox"))] unsafe extern "C" fn notify_bytes_trampoline

(this: *mut ffi::GBytesIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BytesIcon::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/cancellable.rs b/src/auto/cancellable.rs index 92c5e94d..f9042bcf 100644 --- a/src/auto/cancellable.rs +++ b/src/auto/cancellable.rs @@ -113,7 +113,6 @@ unsafe impl Send for Cancellable {} unsafe impl Sync for Cancellable {} unsafe extern "C" fn cancelled_trampoline(this: *mut ffi::GCancellable, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Cancellable) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/src/auto/charset_converter.rs b/src/auto/charset_converter.rs index ed119638..93481f14 100644 --- a/src/auto/charset_converter.rs +++ b/src/auto/charset_converter.rs @@ -118,21 +118,18 @@ impl + IsA> CharsetConverterExt f unsafe extern "C" fn notify_from_charset_trampoline

(this: *mut ffi::GCharsetConverter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&CharsetConverter::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_to_charset_trampoline

(this: *mut ffi::GCharsetConverter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&CharsetConverter::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_fallback_trampoline

(this: *mut ffi::GCharsetConverter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&CharsetConverter::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/converter_input_stream.rs b/src/auto/converter_input_stream.rs index 0f68e557..1b905377 100644 --- a/src/auto/converter_input_stream.rs +++ b/src/auto/converter_input_stream.rs @@ -60,7 +60,6 @@ impl + IsA> ConverterInputStr unsafe extern "C" fn notify_converter_trampoline

(this: *mut ffi::GConverterInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ConverterInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/converter_output_stream.rs b/src/auto/converter_output_stream.rs index cba1706e..a4d5ffd6 100644 --- a/src/auto/converter_output_stream.rs +++ b/src/auto/converter_output_stream.rs @@ -60,7 +60,6 @@ impl + IsA> ConverterOutputS unsafe extern "C" fn notify_converter_trampoline

(this: *mut ffi::GConverterOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ConverterOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/data_input_stream.rs b/src/auto/data_input_stream.rs index ebe74bc1..cdf09d8a 100644 --- a/src/auto/data_input_stream.rs +++ b/src/auto/data_input_stream.rs @@ -206,7 +206,6 @@ impl + IsA + Clone + 'static> Data let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_until_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut length = mem::uninitialized(); let ret = ffi::g_data_input_stream_read_until_finish(_source_object as *mut _, res, &mut length, &mut error); @@ -264,7 +263,6 @@ impl + IsA + Clone + 'static> Data let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_upto_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut length = mem::uninitialized(); let ret = ffi::g_data_input_stream_read_upto_finish(_source_object as *mut _, res, &mut length, &mut error); @@ -334,14 +332,12 @@ impl + IsA + Clone + 'static> Data unsafe extern "C" fn notify_byte_order_trampoline

(this: *mut ffi::GDataInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataInputStream::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_newline_type_trampoline

(this: *mut ffi::GDataInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/data_output_stream.rs b/src/auto/data_output_stream.rs index a327876d..8b7ea4e4 100644 --- a/src/auto/data_output_stream.rs +++ b/src/auto/data_output_stream.rs @@ -166,7 +166,6 @@ impl + IsA> DataOutputStreamExt f unsafe extern "C" fn notify_byte_order_trampoline

(this: *mut ffi::GDataOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/desktop_app_info.rs b/src/auto/desktop_app_info.rs index ef356839..242cb5bb 100644 --- a/src/auto/desktop_app_info.rs +++ b/src/auto/desktop_app_info.rs @@ -224,7 +224,6 @@ impl + IsA> DesktopAppInfoExt for O unsafe extern "C" fn notify_filename_trampoline

(this: *mut ffi::GDesktopAppInfo, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DesktopAppInfo::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/drive.rs b/src/auto/drive.rs index a9b719e4..c405b331 100644 --- a/src/auto/drive.rs +++ b/src/auto/drive.rs @@ -146,7 +146,6 @@ impl + IsA + Clone + 'static> DriveExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_drive_eject_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -190,7 +189,6 @@ impl + IsA + Clone + 'static> DriveExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_drive_eject_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -315,7 +313,6 @@ impl + IsA + Clone + 'static> DriveExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn poll_for_media_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_drive_poll_for_media_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -358,7 +355,6 @@ impl + IsA + Clone + 'static> DriveExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn start_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_drive_start_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -405,7 +401,6 @@ impl + IsA + Clone + 'static> DriveExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn stop_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_drive_stop_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -479,28 +474,24 @@ impl + IsA + Clone + 'static> DriveExt for O unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GDrive, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Drive::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn disconnected_trampoline

(this: *mut ffi::GDrive, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Drive::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn eject_button_trampoline

(this: *mut ffi::GDrive, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Drive::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn stop_button_trampoline

(this: *mut ffi::GDrive, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Drive::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/emblem.rs b/src/auto/emblem.rs index dcafa1a8..e5dcb421 100644 --- a/src/auto/emblem.rs +++ b/src/auto/emblem.rs @@ -82,14 +82,12 @@ impl + IsA> EmblemExt for O { unsafe extern "C" fn notify_icon_trampoline

(this: *mut ffi::GEmblem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Emblem::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_origin_trampoline

(this: *mut ffi::GEmblem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Emblem::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/emblemed_icon.rs b/src/auto/emblemed_icon.rs index f2a170dd..cdd10b4b 100644 --- a/src/auto/emblemed_icon.rs +++ b/src/auto/emblemed_icon.rs @@ -96,7 +96,6 @@ impl + IsA> EmblemedIconExt for O { unsafe extern "C" fn notify_gicon_trampoline

(this: *mut ffi::GEmblemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&EmblemedIcon::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/file.rs b/src/auto/file.rs index 560417a0..9fe9d772 100644 --- a/src/auto/file.rs +++ b/src/auto/file.rs @@ -381,7 +381,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn append_to_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_append_to_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -478,7 +477,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn create_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_create_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -531,7 +529,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn create_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_create_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -585,7 +582,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn delete_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_delete_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -634,7 +630,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_eject_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -678,7 +673,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_mountable_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_eject_mountable_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -838,7 +832,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn load_bytes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut etag_out = ptr::null_mut(); let ret = ffi::g_file_load_bytes_finish(_source_object as *mut _, res, &mut etag_out, &mut error); @@ -894,7 +887,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn load_contents_async_trampoline, String), Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut contents = ptr::null_mut(); let mut length = mem::uninitialized(); @@ -976,7 +968,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn make_directory_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_make_directory_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1094,7 +1085,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn mount_enclosing_volume_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_mount_enclosing_volume_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1141,7 +1131,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn mount_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_mount_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1200,7 +1189,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn open_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_open_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1249,7 +1237,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn poll_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_poll_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1326,7 +1313,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_filesystem_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_query_filesystem_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1380,7 +1366,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1443,7 +1428,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_read_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1499,7 +1483,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn replace_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_replace_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1579,7 +1562,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn replace_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_replace_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1696,7 +1678,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn set_attributes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut info = ptr::null_mut(); let _ = ffi::g_file_set_attributes_finish(_source_object as *mut _, res, &mut info, &mut error); @@ -1762,7 +1743,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn set_display_name_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_set_display_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1808,7 +1788,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn start_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_start_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1855,7 +1834,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn stop_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_stop_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1917,7 +1895,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn trash_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_trash_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -1960,7 +1937,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn unmount_mountable_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_unmount_mountable_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -2004,7 +1980,6 @@ impl + IsA + Clone + 'static> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn unmount_mountable_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_unmount_mountable_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_icon.rs b/src/auto/file_icon.rs index 4d52869d..4b14a555 100644 --- a/src/auto/file_icon.rs +++ b/src/auto/file_icon.rs @@ -59,7 +59,6 @@ impl + IsA> FileIconExt for O { unsafe extern "C" fn notify_file_trampoline

(this: *mut ffi::GFileIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&FileIcon::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/file_input_stream.rs b/src/auto/file_input_stream.rs index 3a53573d..7c7cd032 100644 --- a/src/auto/file_input_stream.rs +++ b/src/auto/file_input_stream.rs @@ -54,7 +54,6 @@ impl + IsA + Clone + 'static> File let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_input_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_io_stream.rs b/src/auto/file_io_stream.rs index 7875d1b2..c2e690d8 100644 --- a/src/auto/file_io_stream.rs +++ b/src/auto/file_io_stream.rs @@ -62,7 +62,6 @@ impl + IsA + Clone + 'static> FileIOS let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_io_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_output_stream.rs b/src/auto/file_output_stream.rs index 6d7da3ad..53e45312 100644 --- a/src/auto/file_output_stream.rs +++ b/src/auto/file_output_stream.rs @@ -62,7 +62,6 @@ impl + IsA + Clone + 'static> Fil let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_output_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/filter_input_stream.rs b/src/auto/filter_input_stream.rs index 080bc15b..835d3fb8 100644 --- a/src/auto/filter_input_stream.rs +++ b/src/auto/filter_input_stream.rs @@ -65,7 +65,6 @@ impl + IsA> FilterInputStreamExt unsafe extern "C" fn notify_close_base_stream_trampoline

(this: *mut ffi::GFilterInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&FilterInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/filter_output_stream.rs b/src/auto/filter_output_stream.rs index 567d374a..b29291db 100644 --- a/src/auto/filter_output_stream.rs +++ b/src/auto/filter_output_stream.rs @@ -65,7 +65,6 @@ impl + IsA> FilterOutputStreamE unsafe extern "C" fn notify_close_base_stream_trampoline

(this: *mut ffi::GFilterOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&FilterOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/functions.rs b/src/auto/functions.rs index a28633da..cfae6acd 100644 --- a/src/auto/functions.rs +++ b/src/auto/functions.rs @@ -207,7 +207,6 @@ pub fn dbus_address_get_stream<'a, P: Into>, Q: FnOnce(R let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn dbus_address_get_stream_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut out_guid = ptr::null_mut(); let ret = ffi::g_dbus_address_get_stream_finish(res, &mut out_guid, &mut error); diff --git a/src/auto/inet_address.rs b/src/auto/inet_address.rs index ec73a744..fcd33e5b 100644 --- a/src/auto/inet_address.rs +++ b/src/auto/inet_address.rs @@ -277,84 +277,72 @@ impl + IsA> InetAddressExt for O { unsafe extern "C" fn notify_bytes_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_any_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_link_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_loopback_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_global_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_link_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_node_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_org_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_site_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_multicast_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_site_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/inet_address_mask.rs b/src/auto/inet_address_mask.rs index c0ca5bc0..62c671be 100644 --- a/src/auto/inet_address_mask.rs +++ b/src/auto/inet_address_mask.rs @@ -146,21 +146,18 @@ impl + IsA> InetAddressMaskExt for unsafe extern "C" fn notify_address_trampoline

(this: *mut ffi::GInetAddressMask, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddressMask::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GInetAddressMask, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddressMask::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_length_trampoline

(this: *mut ffi::GInetAddressMask, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddressMask::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/inet_socket_address.rs b/src/auto/inet_socket_address.rs index b7c51a0a..eb6ae57f 100644 --- a/src/auto/inet_socket_address.rs +++ b/src/auto/inet_socket_address.rs @@ -120,28 +120,24 @@ impl + IsA> InetSocketAddressExt unsafe extern "C" fn notify_address_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flowinfo_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_port_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scope_id_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/input_stream.rs b/src/auto/input_stream.rs index c4405632..2d98e52f 100644 --- a/src/auto/input_stream.rs +++ b/src/auto/input_stream.rs @@ -82,7 +82,6 @@ impl + IsA + Clone + 'static> InputStr let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_input_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -148,7 +147,6 @@ impl + IsA + Clone + 'static> InputStr let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_bytes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_input_stream_read_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -210,7 +208,6 @@ impl + IsA + Clone + 'static> InputStr let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn skip_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_input_stream_skip_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/io_stream.rs b/src/auto/io_stream.rs index 3d1cf6db..86e8ff3c 100644 --- a/src/auto/io_stream.rs +++ b/src/auto/io_stream.rs @@ -82,7 +82,6 @@ impl + IsA + Clone + 'static> IOStreamExt let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_io_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -169,7 +168,6 @@ impl + IsA + Clone + 'static> IOStreamExt unsafe extern "C" fn notify_closed_trampoline

(this: *mut ffi::GIOStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&IOStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/loadable_icon.rs b/src/auto/loadable_icon.rs index f9b71f97..9dfa674c 100644 --- a/src/auto/loadable_icon.rs +++ b/src/auto/loadable_icon.rs @@ -54,7 +54,6 @@ impl + IsA + Clone + 'static> Loadabl let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn load_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut type_ = ptr::null_mut(); let ret = ffi::g_loadable_icon_load_finish(_source_object as *mut _, res, &mut type_, &mut error); diff --git a/src/auto/memory_output_stream.rs b/src/auto/memory_output_stream.rs index da46a6f8..caf75d47 100644 --- a/src/auto/memory_output_stream.rs +++ b/src/auto/memory_output_stream.rs @@ -70,7 +70,6 @@ impl + IsA> MemoryOutputStreamE unsafe extern "C" fn notify_data_size_trampoline

(this: *mut ffi::GMemoryOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MemoryOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/menu_model.rs b/src/auto/menu_model.rs index 1c2ebf23..a52d2559 100644 --- a/src/auto/menu_model.rs +++ b/src/auto/menu_model.rs @@ -107,7 +107,6 @@ impl + IsA> MenuModelExt for O { unsafe extern "C" fn items_changed_trampoline

(this: *mut ffi::GMenuModel, position: libc::c_int, removed: libc::c_int, added: libc::c_int, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, i32, i32, i32) + 'static) = transmute(f); f(&MenuModel::from_glib_borrow(this).downcast_unchecked(), position, removed, added) } diff --git a/src/auto/mount.rs b/src/auto/mount.rs index da22374b..5bda7dc2 100644 --- a/src/auto/mount.rs +++ b/src/auto/mount.rs @@ -127,7 +127,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_mount_eject_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -171,7 +170,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_mount_eject_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -271,7 +269,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn guess_content_type_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_mount_guess_content_type_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -331,7 +328,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn remount_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_mount_remount_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -382,7 +378,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn unmount_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_mount_unmount_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -426,7 +421,6 @@ impl + IsA + Clone + 'static> MountExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn unmount_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_mount_unmount_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -498,21 +492,18 @@ impl + IsA + Clone + 'static> MountExt for O unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GMount, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Mount::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn pre_unmount_trampoline

(this: *mut ffi::GMount, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Mount::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn unmounted_trampoline

(this: *mut ffi::GMount, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Mount::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/mount_operation.rs b/src/auto/mount_operation.rs index a2ee7ae5..5e3c9fdc 100644 --- a/src/auto/mount_operation.rs +++ b/src/auto/mount_operation.rs @@ -267,21 +267,18 @@ impl + IsA> MountOperationExt for O unsafe extern "C" fn aborted_trampoline

(this: *mut ffi::GMountOperation, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn ask_password_trampoline

(this: *mut ffi::GMountOperation, message: *mut libc::c_char, default_user: *mut libc::c_char, default_domain: *mut libc::c_char, flags: ffi::GAskPasswordFlags, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str, &str, &str, AskPasswordFlags) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(message), &String::from_glib_none(default_user), &String::from_glib_none(default_domain), from_glib(flags)) } unsafe extern "C" fn reply_trampoline

(this: *mut ffi::GMountOperation, result: ffi::GMountOperationResult, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, MountOperationResult) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), from_glib(result)) } @@ -289,49 +286,42 @@ where P: IsA { #[cfg(any(feature = "v2_34", feature = "dox"))] unsafe extern "C" fn show_unmount_progress_trampoline

(this: *mut ffi::GMountOperation, message: *mut libc::c_char, time_left: i64, bytes_left: i64, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str, i64, i64) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(message), time_left, bytes_left) } unsafe extern "C" fn notify_anonymous_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_choice_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_domain_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_password_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_password_save_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_username_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/network_address.rs b/src/auto/network_address.rs index 0505e47f..8f3c02e0 100644 --- a/src/auto/network_address.rs +++ b/src/auto/network_address.rs @@ -117,21 +117,18 @@ impl + IsA> NetworkAddressExt for O unsafe extern "C" fn notify_hostname_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_port_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scheme_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/network_service.rs b/src/auto/network_service.rs index cd61c539..a4d223c0 100644 --- a/src/auto/network_service.rs +++ b/src/auto/network_service.rs @@ -119,28 +119,24 @@ impl + IsA> NetworkServiceExt for O unsafe extern "C" fn notify_domain_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scheme_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_service_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/output_stream.rs b/src/auto/output_stream.rs index 3ea3df2f..30fa6c2a 100644 --- a/src/auto/output_stream.rs +++ b/src/auto/output_stream.rs @@ -100,7 +100,6 @@ impl + IsA + Clone + 'static> OutputS let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_output_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -152,7 +151,6 @@ impl + IsA + Clone + 'static> OutputS let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn flush_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_output_stream_flush_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -235,7 +233,6 @@ impl + IsA + Clone + 'static> OutputS let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn splice_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_output_stream_splice_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; @@ -318,7 +315,6 @@ impl + IsA + Clone + 'static> OutputS let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn write_bytes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_output_stream_write_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/permission.rs b/src/auto/permission.rs index 73440fc4..eb9d83af 100644 --- a/src/auto/permission.rs +++ b/src/auto/permission.rs @@ -75,7 +75,6 @@ impl + IsA + Clone + 'static> Permissio let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn acquire_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_permission_acquire_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -150,7 +149,6 @@ impl + IsA + Clone + 'static> Permissio let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn release_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_permission_release_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -212,21 +210,18 @@ impl + IsA + Clone + 'static> Permissio unsafe extern "C" fn notify_allowed_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_can_acquire_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_can_release_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/resolver.rs b/src/auto/resolver.rs index 0e7e1a23..705c49d7 100644 --- a/src/auto/resolver.rs +++ b/src/auto/resolver.rs @@ -102,7 +102,6 @@ impl + IsA + Clone + 'static> ResolverExt let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_by_address_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_address_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -155,7 +154,6 @@ impl + IsA + Clone + 'static> ResolverExt let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_by_name_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -210,7 +208,6 @@ impl + IsA + Clone + 'static> ResolverExt let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_records_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_records_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -265,7 +262,6 @@ impl + IsA + Clone + 'static> ResolverExt let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_service_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_service_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -323,7 +319,6 @@ impl + IsA + Clone + 'static> ResolverExt unsafe extern "C" fn reload_trampoline

(this: *mut ffi::GResolver, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Resolver::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/settings.rs b/src/auto/settings.rs index 0d04ee75..ae1e9a3d 100644 --- a/src/auto/settings.rs +++ b/src/auto/settings.rs @@ -599,70 +599,60 @@ impl + IsA> SettingsExt for O { unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GSettings, key: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(key)) } unsafe extern "C" fn writable_change_event_trampoline

(this: *mut ffi::GSettings, key: libc::c_uint, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, u32) -> Inhibit + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), key).to_glib() } unsafe extern "C" fn writable_changed_trampoline

(this: *mut ffi::GSettings, key: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(key)) } unsafe extern "C" fn notify_backend_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_delay_apply_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_has_unapplied_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_path_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_schema_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_schema_id_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_settings_schema_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/simple_action.rs b/src/auto/simple_action.rs index 44433b71..e689f798 100644 --- a/src/auto/simple_action.rs +++ b/src/auto/simple_action.rs @@ -127,35 +127,30 @@ impl + IsA> SimpleActionExt for O { unsafe extern "C" fn activate_trampoline

(this: *mut ffi::GSimpleAction, parameter: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Option) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(parameter)) } unsafe extern "C" fn change_state_trampoline

(this: *mut ffi::GSimpleAction, value: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Option) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(value)) } unsafe extern "C" fn notify_enabled_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_type_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket.rs b/src/auto/socket.rs index 20eb862b..8e6d2b19 100644 --- a/src/auto/socket.rs +++ b/src/auto/socket.rs @@ -600,91 +600,78 @@ impl + IsA> SocketExt for O { unsafe extern "C" fn notify_blocking_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_broadcast_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_keepalive_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_listen_backlog_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_local_address_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_multicast_loopback_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_multicast_ttl_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_remote_address_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_ttl_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_type_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_address.rs b/src/auto/socket_address.rs index 3850e3cd..6eff69e4 100644 --- a/src/auto/socket_address.rs +++ b/src/auto/socket_address.rs @@ -70,7 +70,6 @@ impl + IsA> SocketAddressExt for O { unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_address_enumerator.rs b/src/auto/socket_address_enumerator.rs index 183d542c..552c4e37 100644 --- a/src/auto/socket_address_enumerator.rs +++ b/src/auto/socket_address_enumerator.rs @@ -52,7 +52,6 @@ impl + IsA + Clone + 'stat let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn next_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_address_enumerator_next_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/socket_client.rs b/src/auto/socket_client.rs index c8f61ac9..0fbe0379 100644 --- a/src/auto/socket_client.rs +++ b/src/auto/socket_client.rs @@ -171,7 +171,6 @@ impl + IsA + Clone + 'static> SocketC let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -224,7 +223,6 @@ impl + IsA + Clone + 'static> SocketC let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_host_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_host_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -278,7 +276,6 @@ impl + IsA + Clone + 'static> SocketC let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_service_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_service_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -333,7 +330,6 @@ impl + IsA + Clone + 'static> SocketC let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_uri_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_uri_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -577,35 +573,30 @@ impl + IsA + Clone + 'static> SocketC unsafe extern "C" fn event_trampoline

(this: *mut ffi::GSocketClient, event: ffi::GSocketClientEvent, connectable: *mut ffi::GSocketConnectable, connection: *mut ffi::GIOStream, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, SocketClientEvent, &SocketConnectable, &Option) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked(), from_glib(event), &from_glib_borrow(connectable), &from_glib_borrow(connection)) } unsafe extern "C" fn notify_enable_proxy_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_local_address_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } @@ -613,35 +604,30 @@ where P: IsA { #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn notify_proxy_resolver_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_tls_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_tls_validation_flags_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_type_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_connection.rs b/src/auto/socket_connection.rs index d11fa333..52b046b9 100644 --- a/src/auto/socket_connection.rs +++ b/src/auto/socket_connection.rs @@ -83,7 +83,6 @@ impl + IsA + Clone + 'static> Soc let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_socket_connection_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -159,7 +158,6 @@ impl + IsA + Clone + 'static> Soc unsafe extern "C" fn notify_socket_trampoline

(this: *mut ffi::GSocketConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_listener.rs b/src/auto/socket_listener.rs index b979293f..8159bebd 100644 --- a/src/auto/socket_listener.rs +++ b/src/auto/socket_listener.rs @@ -101,7 +101,6 @@ impl + IsA + Clone + 'static> Socke let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn accept_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut source_object = ptr::null_mut(); let ret = ffi::g_socket_listener_accept_finish(_source_object as *mut _, res, &mut source_object, &mut error); @@ -236,14 +235,12 @@ impl + IsA + Clone + 'static> Socke #[cfg(any(feature = "v2_46", feature = "dox"))] unsafe extern "C" fn event_trampoline

(this: *mut ffi::GSocketListener, event: ffi::GSocketListenerEvent, socket: *mut ffi::GSocket, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, SocketListenerEvent, &Socket) + 'static) = transmute(f); f(&SocketListener::from_glib_borrow(this).downcast_unchecked(), from_glib(event), &from_glib_borrow(socket)) } unsafe extern "C" fn notify_listen_backlog_trampoline

(this: *mut ffi::GSocketListener, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketListener::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_service.rs b/src/auto/socket_service.rs index b9568de7..8a154fe6 100644 --- a/src/auto/socket_service.rs +++ b/src/auto/socket_service.rs @@ -118,7 +118,6 @@ impl + IsA> SocketServiceExt for O { unsafe extern "C" fn incoming_trampoline

(this: *mut ffi::GSocketService, connection: *mut ffi::GSocketConnection, source_object: *mut gobject_ffi::GObject, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &SocketConnection, &Option) -> bool + 'static) = transmute(f); f(&SocketService::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(connection), &from_glib_borrow(source_object)).to_glib() } @@ -126,7 +125,6 @@ where P: IsA { #[cfg(any(feature = "v2_46", feature = "dox"))] unsafe extern "C" fn notify_active_trampoline

(this: *mut ffi::GSocketService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/subprocess.rs b/src/auto/subprocess.rs index f6cdd660..74a824cb 100644 --- a/src/auto/subprocess.rs +++ b/src/auto/subprocess.rs @@ -155,7 +155,6 @@ impl + IsA + Clone + 'static> Subproces let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn communicate_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let mut stdout_buf = ptr::null_mut(); let mut stderr_buf = ptr::null_mut(); @@ -313,7 +312,6 @@ impl + IsA + Clone + 'static> Subproces let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn wait_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_subprocess_wait_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -367,7 +365,6 @@ impl + IsA + Clone + 'static> Subproces let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn wait_check_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_subprocess_wait_check_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -422,14 +419,12 @@ impl + IsA + Clone + 'static> Subproces unsafe extern "C" fn notify_argv_trampoline

(this: *mut ffi::GSubprocess, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Subprocess::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GSubprocess, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Subprocess::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/subprocess_launcher.rs b/src/auto/subprocess_launcher.rs index 2b20c9de..3d066a94 100644 --- a/src/auto/subprocess_launcher.rs +++ b/src/auto/subprocess_launcher.rs @@ -182,7 +182,6 @@ impl + IsA> SubprocessLauncherE unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GSubprocessLauncher, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SubprocessLauncher::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tcp_connection.rs b/src/auto/tcp_connection.rs index aae36f30..3553bfa9 100644 --- a/src/auto/tcp_connection.rs +++ b/src/auto/tcp_connection.rs @@ -58,7 +58,6 @@ impl + IsA> TcpConnectionExt for O { unsafe extern "C" fn notify_graceful_disconnect_trampoline

(this: *mut ffi::GTcpConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TcpConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/themed_icon.rs b/src/auto/themed_icon.rs index a5b0c4a4..313f0940 100644 --- a/src/auto/themed_icon.rs +++ b/src/auto/themed_icon.rs @@ -118,21 +118,18 @@ impl + IsA> ThemedIconExt for O { unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_names_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_default_fallbacks_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/threaded_socket_service.rs b/src/auto/threaded_socket_service.rs index e7a64919..f9099002 100644 --- a/src/auto/threaded_socket_service.rs +++ b/src/auto/threaded_socket_service.rs @@ -73,14 +73,12 @@ impl + IsA> ThreadedSocketSe unsafe extern "C" fn run_trampoline

(this: *mut ffi::GThreadedSocketService, connection: *mut ffi::GSocketConnection, source_object: *mut gobject_ffi::GObject, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &SocketConnection, &glib::Object) -> bool + 'static) = transmute(f); f(&ThreadedSocketService::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(connection), &from_glib_borrow(source_object)).to_glib() } unsafe extern "C" fn notify_max_threads_trampoline

(this: *mut ffi::GThreadedSocketService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThreadedSocketService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_certificate.rs b/src/auto/tls_certificate.rs index dde89409..3ea60550 100644 --- a/src/auto/tls_certificate.rs +++ b/src/auto/tls_certificate.rs @@ -171,35 +171,30 @@ impl + IsA> TlsCertificateExt for O unsafe extern "C" fn notify_certificate_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_certificate_pem_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_issuer_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_private_key_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_private_key_pem_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_client_connection.rs b/src/auto/tls_client_connection.rs index ded03836..1a735711 100644 --- a/src/auto/tls_client_connection.rs +++ b/src/auto/tls_client_connection.rs @@ -154,28 +154,24 @@ impl + IsA> TlsClientConnectio unsafe extern "C" fn notify_accepted_cas_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_server_identity_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_ssl3_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_validation_flags_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_connection.rs b/src/auto/tls_connection.rs index a5a4463f..4575586c 100644 --- a/src/auto/tls_connection.rs +++ b/src/auto/tls_connection.rs @@ -171,7 +171,6 @@ impl + IsA + Clone + 'static> TlsCon let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn handshake_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_tls_connection_handshake_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -336,70 +335,60 @@ impl + IsA + Clone + 'static> TlsCon unsafe extern "C" fn accept_certificate_trampoline

(this: *mut ffi::GTlsConnection, peer_cert: *mut ffi::GTlsCertificate, errors: ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &TlsCertificate, TlsCertificateFlags) -> bool + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(peer_cert), from_glib(errors)).to_glib() } unsafe extern "C" fn notify_base_io_stream_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_certificate_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_database_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_interaction_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_peer_certificate_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_peer_certificate_errors_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_rehandshake_mode_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_require_close_notify_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_system_certdb_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_database.rs b/src/auto/tls_database.rs index 5960d74c..c1be5163 100644 --- a/src/auto/tls_database.rs +++ b/src/auto/tls_database.rs @@ -90,7 +90,6 @@ impl + IsA + Clone + 'static> TlsDatab let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_certificate_for_handle_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_for_handle_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -151,7 +150,6 @@ impl + IsA + Clone + 'static> TlsDatab let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_certificate_issuer_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_issuer_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -252,7 +250,6 @@ impl + IsA + Clone + 'static> TlsDatab let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn verify_chain_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_verify_chain_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/tls_file_database.rs b/src/auto/tls_file_database.rs index 3d1a8f0d..4545dd46 100644 --- a/src/auto/tls_file_database.rs +++ b/src/auto/tls_file_database.rs @@ -73,7 +73,6 @@ impl + IsA> TlsFileDatabaseExt for unsafe extern "C" fn notify_anchors_trampoline

(this: *mut ffi::GTlsFileDatabase, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsFileDatabase::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_interaction.rs b/src/auto/tls_interaction.rs index 496e8608..1b2ef305 100644 --- a/src/auto/tls_interaction.rs +++ b/src/auto/tls_interaction.rs @@ -72,7 +72,6 @@ impl + IsA + Clone + 'static> TlsIn let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn ask_password_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_interaction_ask_password_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; @@ -148,7 +147,6 @@ impl + IsA + Clone + 'static> TlsIn let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn request_certificate_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_interaction_request_certificate_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/tls_password.rs b/src/auto/tls_password.rs index 6147a2d7..85943bab 100644 --- a/src/auto/tls_password.rs +++ b/src/auto/tls_password.rs @@ -123,21 +123,18 @@ impl + IsA> TlsPasswordExt for O { unsafe extern "C" fn notify_description_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_warning_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_server_connection.rs b/src/auto/tls_server_connection.rs index a8a5b561..7eb1fc36 100644 --- a/src/auto/tls_server_connection.rs +++ b/src/auto/tls_server_connection.rs @@ -77,7 +77,6 @@ impl + IsA> TlsServerConnectio unsafe extern "C" fn notify_authentication_mode_trampoline

(this: *mut ffi::GTlsServerConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsServerConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/unix_socket_address.rs b/src/auto/unix_socket_address.rs index a35a3745..bcea1056 100644 --- a/src/auto/unix_socket_address.rs +++ b/src/auto/unix_socket_address.rs @@ -125,21 +125,18 @@ impl + IsA> UnixSocketAddressExt unsafe extern "C" fn notify_abstract_trampoline

(this: *mut ffi::GUnixSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&UnixSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_address_type_trampoline

(this: *mut ffi::GUnixSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&UnixSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_path_as_array_trampoline

(this: *mut ffi::GUnixSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&UnixSocketAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/versions.txt b/src/auto/versions.txt index a53a0b9b..e472678d 100644 --- a/src/auto/versions.txt +++ b/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (/~https://github.com/gtk-rs/gir @ 55aec83) +Generated by gir (/~https://github.com/gtk-rs/gir @ ae2fd07) from gir-files (/~https://github.com/gtk-rs/gir-files @ 47c69e6) diff --git a/src/auto/volume.rs b/src/auto/volume.rs index 96fb1dd4..92539889 100644 --- a/src/auto/volume.rs +++ b/src/auto/volume.rs @@ -104,7 +104,6 @@ impl + IsA + Clone + 'static> VolumeExt for let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_volume_eject_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -148,7 +147,6 @@ impl + IsA + Clone + 'static> VolumeExt for let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn eject_with_operation_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_volume_eject_with_operation_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -256,7 +254,6 @@ impl + IsA + Clone + 'static> VolumeExt for let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn mount_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { - callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_volume_mount_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -320,14 +317,12 @@ impl + IsA + Clone + 'static> VolumeExt for unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GVolume, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Volume::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn removed_trampoline

(this: *mut ffi::GVolume, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Volume::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/zlib_compressor.rs b/src/auto/zlib_compressor.rs index ddac5bf2..9890e883 100644 --- a/src/auto/zlib_compressor.rs +++ b/src/auto/zlib_compressor.rs @@ -111,21 +111,18 @@ impl + IsA> ZlibCompressorExt for O unsafe extern "C" fn notify_file_info_trampoline

(this: *mut ffi::GZlibCompressor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ZlibCompressor::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_format_trampoline

(this: *mut ffi::GZlibCompressor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ZlibCompressor::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_level_trampoline

(this: *mut ffi::GZlibCompressor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ZlibCompressor::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/zlib_decompressor.rs b/src/auto/zlib_decompressor.rs index a446968d..8a0ba064 100644 --- a/src/auto/zlib_decompressor.rs +++ b/src/auto/zlib_decompressor.rs @@ -81,14 +81,12 @@ impl + IsA> ZlibDecompressorExt f unsafe extern "C" fn notify_file_info_trampoline

(this: *mut ffi::GZlibDecompressor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ZlibDecompressor::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_format_trampoline

(this: *mut ffi::GZlibDecompressor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ZlibDecompressor::from_glib_borrow(this).downcast_unchecked()) } From 09929b40e14de375219947ca4aa6b1b01dcdb0ae Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Wed, 27 Jun 2018 20:33:57 +0300 Subject: [PATCH 4/4] Ignore clippy warnings --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index eda39c55..f2c1b138 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,9 @@ // Licensed under the MIT license, see the LICENSE file or #![allow(deprecated)] +#![cfg_attr(feature = "cargo-clippy", allow(let_and_return))] +#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] +#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))] #[macro_use] extern crate bitflags;