Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate gir without link attribute #1508

Merged
merged 8 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions gdk-pixbuf/src/auto/pixbuf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ pub trait PixbufLoaderExt: IsA<PixbufLoader> + sealed::Sealed + 'static {
F: Fn(&P, i32, i32, i32, i32) + 'static,
>(
this: *mut ffi::GdkPixbufLoader,
x: libc::c_int,
y: libc::c_int,
width: libc::c_int,
height: libc::c_int,
x: std::ffi::c_int,
y: std::ffi::c_int,
width: std::ffi::c_int,
height: std::ffi::c_int,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down Expand Up @@ -247,8 +247,8 @@ pub trait PixbufLoaderExt: IsA<PixbufLoader> + sealed::Sealed + 'static {
F: Fn(&P, i32, i32) + 'static,
>(
this: *mut ffi::GdkPixbufLoader,
width: libc::c_int,
height: libc::c_int,
width: std::ffi::c_int,
height: std::ffi::c_int,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
12 changes: 6 additions & 6 deletions gdk-pixbuf/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;

#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
Expand Down Expand Up @@ -396,7 +397,6 @@ impl ::std::fmt::Debug for GdkPixbufSimpleAnimIter {
}
}

#[link(name = "gdk_pixbuf-2.0")]
extern "C" {

//=========================================================================
Expand Down
2 changes: 1 addition & 1 deletion gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
8 changes: 4 additions & 4 deletions gio/src/auto/action_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub trait ActionGroupExt: IsA<ActionGroup> + sealed::Sealed + 'static {
F: Fn(&P, &str) + 'static,
>(
this: *mut ffi::GActionGroup,
action_name: *mut libc::c_char,
action_name: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down Expand Up @@ -215,7 +215,7 @@ pub trait ActionGroupExt: IsA<ActionGroup> + sealed::Sealed + 'static {
F: Fn(&P, &str, bool) + 'static,
>(
this: *mut ffi::GActionGroup,
action_name: *mut libc::c_char,
action_name: *mut std::ffi::c_char,
enabled: glib::ffi::gboolean,
f: glib::ffi::gpointer,
) {
Expand Down Expand Up @@ -255,7 +255,7 @@ pub trait ActionGroupExt: IsA<ActionGroup> + sealed::Sealed + 'static {
F: Fn(&P, &str) + 'static,
>(
this: *mut ffi::GActionGroup,
action_name: *mut libc::c_char,
action_name: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down Expand Up @@ -292,7 +292,7 @@ pub trait ActionGroupExt: IsA<ActionGroup> + sealed::Sealed + 'static {
F: Fn(&P, &str, &glib::Variant) + 'static,
>(
this: *mut ffi::GActionGroup,
action_name: *mut libc::c_char,
action_name: *mut std::ffi::c_char,
value: *mut glib::ffi::GVariant,
f: glib::ffi::gpointer,
) {
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/app_launch_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub trait AppLaunchContextExt: IsA<AppLaunchContext> + sealed::Sealed + 'static
F: Fn(&P, &str) + 'static,
>(
this: *mut ffi::GAppLaunchContext,
startup_notify_id: *mut libc::c_char,
startup_notify_id: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down
4 changes: 2 additions & 2 deletions gio/src/auto/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ pub trait ApplicationExt: IsA<Application> + sealed::Sealed + 'static {
this: *mut ffi::GApplication,
command_line: *mut ffi::GApplicationCommandLine,
f: glib::ffi::gpointer,
) -> libc::c_int {
) -> std::ffi::c_int {
let f: &F = &*(f as *const F);
f(
Application::from_glib_borrow(this).unsafe_cast_ref(),
Expand Down Expand Up @@ -512,7 +512,7 @@ pub trait ApplicationExt: IsA<Application> + sealed::Sealed + 'static {
this: *mut ffi::GApplication,
options: *mut glib::ffi::GVariantDict,
f: glib::ffi::gpointer,
) -> libc::c_int {
) -> std::ffi::c_int {
let f: &F = &*(f as *const F);
f(
Application::from_glib_borrow(this).unsafe_cast_ref(),
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/dbus_auth_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl DBusAuthObserver {
F: Fn(&DBusAuthObserver, &str) -> bool + 'static,
>(
this: *mut ffi::GDBusAuthObserver,
mechanism: *mut libc::c_char,
mechanism: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) -> glib::ffi::gboolean {
let f: &F = &*(f as *const F);
Expand Down
6 changes: 3 additions & 3 deletions gio/src/auto/list_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ pub trait ListModelExt: IsA<ListModel> + sealed::Sealed + 'static {
F: Fn(&P, u32, u32, u32) + 'static,
>(
this: *mut ffi::GListModel,
position: libc::c_uint,
removed: libc::c_uint,
added: libc::c_uint,
position: std::ffi::c_uint,
removed: std::ffi::c_uint,
added: std::ffi::c_uint,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down
6 changes: 3 additions & 3 deletions gio/src/auto/menu_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ pub trait MenuModelExt: IsA<MenuModel> + sealed::Sealed + 'static {
F: Fn(&P, i32, i32, i32) + 'static,
>(
this: *mut ffi::GMenuModel,
position: libc::c_int,
removed: libc::c_int,
added: libc::c_int,
position: std::ffi::c_int,
removed: std::ffi::c_int,
added: std::ffi::c_int,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down
8 changes: 4 additions & 4 deletions gio/src/auto/mount_operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ pub trait MountOperationExt: IsA<MountOperation> + sealed::Sealed + 'static {
F: Fn(&P, &str, &str, &str, AskPasswordFlags) + 'static,
>(
this: *mut ffi::GMountOperation,
message: *mut libc::c_char,
default_user: *mut libc::c_char,
default_domain: *mut libc::c_char,
message: *mut std::ffi::c_char,
default_user: *mut std::ffi::c_char,
default_domain: *mut std::ffi::c_char,
flags: ffi::GAskPasswordFlags,
f: glib::ffi::gpointer,
) {
Expand Down Expand Up @@ -348,7 +348,7 @@ pub trait MountOperationExt: IsA<MountOperation> + sealed::Sealed + 'static {
F: Fn(&P, &str, i64, i64) + 'static,
>(
this: *mut ffi::GMountOperation,
message: *mut libc::c_char,
message: *mut std::ffi::c_char,
time_left: i64,
bytes_left: i64,
f: glib::ffi::gpointer,
Expand Down
6 changes: 3 additions & 3 deletions gio/src/auto/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ pub trait SettingsExt: IsA<Settings> + sealed::Sealed + 'static {
) -> SignalHandlerId {
unsafe extern "C" fn changed_trampoline<P: IsA<Settings>, F: Fn(&P, &str) + 'static>(
this: *mut ffi::GSettings,
key: *mut libc::c_char,
key: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down Expand Up @@ -553,7 +553,7 @@ pub trait SettingsExt: IsA<Settings> + sealed::Sealed + 'static {
F: Fn(&P, u32) -> glib::Propagation + 'static,
>(
this: *mut ffi::GSettings,
key: libc::c_uint,
key: std::ffi::c_uint,
f: glib::ffi::gpointer,
) -> glib::ffi::gboolean {
let f: &F = &*(f as *const F);
Expand Down Expand Up @@ -583,7 +583,7 @@ pub trait SettingsExt: IsA<Settings> + sealed::Sealed + 'static {
F: Fn(&P, &str) + 'static,
>(
this: *mut ffi::GSettings,
key: *mut libc::c_char,
key: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
Expand Down
2 changes: 1 addition & 1 deletion gio/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
4 changes: 2 additions & 2 deletions gio/src/auto/vfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub trait VfsExt: IsA<Vfs> + sealed::Sealed + 'static {
Box_::new(uri_func);
unsafe extern "C" fn uri_func_func(
vfs: *mut ffi::GVfs,
identifier: *const libc::c_char,
identifier: *const std::ffi::c_char,
user_data: glib::ffi::gpointer,
) -> *mut ffi::GFile {
let vfs = from_glib_borrow(vfs);
Expand All @@ -121,7 +121,7 @@ pub trait VfsExt: IsA<Vfs> + sealed::Sealed + 'static {
Box_::new(parse_name_func);
unsafe extern "C" fn parse_name_func_func(
vfs: *mut ffi::GVfs,
identifier: *const libc::c_char,
identifier: *const std::ffi::c_char,
user_data: glib::ffi::gpointer,
) -> *mut ffi::GFile {
let vfs = from_glib_borrow(vfs);
Expand Down
12 changes: 6 additions & 6 deletions gio/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ mod manual;

pub use manual::*;

#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
Expand Down Expand Up @@ -9363,7 +9364,6 @@ impl ::std::fmt::Debug for GVolume {
}
}

#[link(name = "gio-2.0")]
extern "C" {

//=========================================================================
Expand Down
1 change: 0 additions & 1 deletion gio/sys/src/manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ mod windows_streams {
gboolean, GInputStream, GInputStreamClass, GOutputStream, GOutputStreamClass, GType,
};

#[link(name = "gio-2.0")]
extern "C" {
//=========================================================================
// GWin32InputStream
Expand Down
2 changes: 1 addition & 1 deletion gio/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
2 changes: 1 addition & 1 deletion gir
12 changes: 6 additions & 6 deletions glib/gobject-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@

use glib_sys as glib;

#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
Expand Down Expand Up @@ -1415,7 +1416,6 @@ impl ::std::fmt::Debug for GTypePlugin {
}
}

#[link(name = "gobject-2.0")]
extern "C" {

//=========================================================================
Expand Down
2 changes: 1 addition & 1 deletion glib/gobject-sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
2 changes: 1 addition & 1 deletion glib/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ ae08ff966747)
Generated by gir (https://github.com/gtk-rs/gir @ a11b11f2e403)
from gir-files (https://github.com/gtk-rs/gir-files @ 4d1189172a70)
Loading
Loading