Skip to content

Commit c29dd6e

Browse files
Ignore various functions
Those appeared recently and are not part of a new release so it causes various issues
1 parent 39ed7d4 commit c29dd6e

File tree

9 files changed

+44
-160
lines changed

9 files changed

+44
-160
lines changed

gio/Gir.toml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ generate = [
9898
"Gio.Proxy",
9999
"Gio.ProxyResolver",
100100
"Gio.RemoteActionGroup",
101-
"Gio.Resolver",
102101
"Gio.ResolverError",
103102
"Gio.ResolverNameLookupFlags",
104-
"Gio.ResolverRecordType",
105103
"Gio.ResourceError",
106104
"Gio.ResourceLookupFlags",
107105
"Gio.Seekable",
@@ -1139,6 +1137,22 @@ name = "Gio.ProxyAddress"
11391137
status = "generate"
11401138
concurrency = "send+sync"
11411139

1140+
[[object]]
1141+
name = "Gio.Resolver"
1142+
status = "generate"
1143+
[[object.function]]
1144+
# see https://gitlab.gnome.org/GNOME/glib/-/issues/3231
1145+
name = "records_from_res_query"
1146+
ignore = true
1147+
1148+
[[object]]
1149+
name = "Gio.ResolverRecordType"
1150+
status = "generate"
1151+
[[object.function]]
1152+
# see https://gitlab.gnome.org/GNOME/glib/-/issues/3231
1153+
name = "to_rrtype"
1154+
ignore = true
1155+
11421156
[[object]]
11431157
name = "Gio.Resource"
11441158
status = "generate"

gio/src/auto/enums.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,13 +2565,6 @@ pub enum ResolverRecordType {
25652565
__Unknown(i32),
25662566
}
25672567

2568-
impl ResolverRecordType {
2569-
#[doc(alias = "g_resolver_record_type_to_rrtype")]
2570-
pub fn to_rrtype(self) -> i32 {
2571-
unsafe { ffi::g_resolver_record_type_to_rrtype(self.into_glib()) }
2572-
}
2573-
}
2574-
25752568
#[doc(hidden)]
25762569
impl IntoGlib for ResolverRecordType {
25772570
type GlibType = ffi::GResolverRecordType;

gio/src/auto/resolver.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ impl Resolver {
4141
pub fn default() -> Resolver {
4242
unsafe { from_glib_full(ffi::g_resolver_get_default()) }
4343
}
44-
45-
//#[doc(alias = "g_resolver_records_from_res_query")]
46-
//pub fn records_from_res_query(rrname: &str, rrtype: i32, answer: u8, len: isize, herr: i32) -> Result</*Unimplemented*/Vec<Basic: Pointer>, glib::Error> {
47-
// unsafe { TODO: call ffi:g_resolver_records_from_res_query() }
48-
//}
4944
}
5045

5146
mod sealed {

gio/sys/Gir.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,17 @@ status = "generate"
4444
[[object.function]]
4545
name = "close"
4646
cfg_condition = "unix"
47+
48+
[[object]]
49+
name = "Gio.Resolver"
50+
status = "generate"
51+
[[object.function]]
52+
name = "records_from_res_query"
53+
ignore = true
54+
55+
[[object]]
56+
name = "Gio.ResolverRecordType"
57+
status = "generate"
58+
[[object.function]]
59+
name = "to_rrtype"
60+
ignore = true

gio/sys/src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9379,7 +9379,6 @@ extern "C" {
93799379
// GResolverRecordType
93809380
//=========================================================================
93819381
pub fn g_resolver_record_type_get_type() -> GType;
9382-
pub fn g_resolver_record_type_to_rrtype(type_: GResolverRecordType) -> c_int;
93839382

93849383
//=========================================================================
93859384
// GResourceError
@@ -12852,14 +12851,6 @@ extern "C" {
1285212851
pub fn g_resolver_free_addresses(addresses: *mut glib::GList);
1285312852
pub fn g_resolver_free_targets(targets: *mut glib::GList);
1285412853
pub fn g_resolver_get_default() -> *mut GResolver;
12855-
pub fn g_resolver_records_from_res_query(
12856-
rrname: *const c_char,
12857-
rrtype: c_int,
12858-
answer: *const u8,
12859-
len: ssize_t,
12860-
herr: c_int,
12861-
error: *mut *mut glib::GError,
12862-
) -> *mut glib::GList;
1286312854
#[cfg(feature = "v2_78")]
1286412855
#[cfg_attr(docsrs, doc(cfg(feature = "v2_78")))]
1286512856
pub fn g_resolver_get_timeout(resolver: *mut GResolver) -> c_uint;

glib/Gir.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ status = "generate"
134134
pattern = "(idle_remove_by_data|qsort_with_data)"
135135
ignore = true # Unsafe functions
136136
[[object.function]]
137+
pattern = "trace_(define_int64_counter|set_int64_counter|mark)"
138+
ignore = true # not useful
139+
[[object.function]]
140+
pattern = "(fopen|creat|chmod|blow_chunks|utime|slice_debug_tree_statistics|rename|remove|open|mkdir|lstat|fsync|freopen|set_prgname_once)"
141+
ignore = true # see https://gitlab.gnome.org/GNOME/glib/-/issues/3231
142+
[[object.function]]
137143
pattern = "iconv"
138144
doc_struct_name = "IConv"
139145
manual = true

glib/src/auto/functions.rs

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ pub fn base64_encode(data: &[u8]) -> crate::GString {
5757
// unsafe { TODO: call ffi:g_base64_encode_step() }
5858
//}
5959

60-
#[doc(alias = "g_blow_chunks")]
61-
pub fn blow_chunks() {
62-
unsafe {
63-
ffi::g_blow_chunks();
64-
}
65-
}
66-
6760
#[doc(alias = "glib_check_version")]
6861
pub fn check_version(
6962
required_major: u32,
@@ -79,11 +72,6 @@ pub fn check_version(
7972
}
8073
}
8174

82-
#[doc(alias = "g_chmod")]
83-
pub fn chmod(filename: impl AsRef<std::path::Path>, mode: i32) -> i32 {
84-
unsafe { ffi::g_chmod(filename.as_ref().to_glib_none().0, mode) }
85-
}
86-
8775
#[doc(alias = "g_compute_checksum_for_bytes")]
8876
pub fn compute_checksum_for_bytes(
8977
checksum_type: ChecksumType,
@@ -142,11 +130,6 @@ pub fn compute_hmac_for_data(digest_type: ChecksumType, key: &[u8], data: &[u8])
142130
}
143131
}
144132

145-
#[doc(alias = "g_creat")]
146-
pub fn creat(filename: impl AsRef<std::path::Path>, mode: i32) -> i32 {
147-
unsafe { ffi::g_creat(filename.as_ref().to_glib_none().0, mode) }
148-
}
149-
150133
#[doc(alias = "g_dcgettext")]
151134
pub fn dcgettext(domain: Option<&str>, msgid: &str, category: i32) -> crate::GString {
152135
unsafe {
@@ -333,11 +316,6 @@ pub fn find_program_in_path(program: impl AsRef<std::path::Path>) -> Option<std:
333316
}
334317
}
335318

336-
//#[doc(alias = "g_fopen")]
337-
//pub fn fopen(filename: impl AsRef<std::path::Path>, mode: &str) -> /*Unimplemented*/Option<Basic: Pointer> {
338-
// unsafe { TODO: call ffi:g_fopen() }
339-
//}
340-
341319
#[doc(alias = "g_format_size")]
342320
pub fn format_size(size: u64) -> crate::GString {
343321
unsafe { from_glib_full(ffi::g_format_size(size)) }
@@ -348,18 +326,6 @@ pub fn format_size_full(size: u64, flags: FormatSizeFlags) -> crate::GString {
348326
unsafe { from_glib_full(ffi::g_format_size_full(size, flags.into_glib())) }
349327
}
350328

351-
//#[doc(alias = "g_freopen")]
352-
//pub fn freopen(filename: impl AsRef<std::path::Path>, mode: &str, stream: /*Unimplemented*/Option<Basic: Pointer>) -> /*Unimplemented*/Option<Basic: Pointer> {
353-
// unsafe { TODO: call ffi:g_freopen() }
354-
//}
355-
356-
#[cfg(feature = "v2_64")]
357-
#[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))]
358-
#[doc(alias = "g_fsync")]
359-
pub fn fsync(fd: i32) -> i32 {
360-
unsafe { ffi::g_fsync(fd) }
361-
}
362-
363329
#[doc(alias = "g_get_application_name")]
364330
#[doc(alias = "get_application_name")]
365331
pub fn application_name() -> Option<crate::GString> {
@@ -567,11 +533,6 @@ pub fn listenv() -> Vec<std::ffi::OsString> {
567533
unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_listenv()) }
568534
}
569535

570-
//#[doc(alias = "g_lstat")]
571-
//pub fn lstat(filename: impl AsRef<std::path::Path>, buf: /*Ignored*/&mut StatBuf) -> i32 {
572-
// unsafe { TODO: call ffi:g_lstat() }
573-
//}
574-
575536
#[doc(alias = "g_main_current_source")]
576537
pub fn main_current_source() -> Option<Source> {
577538
unsafe { from_glib_none(ffi::g_main_current_source()) }
@@ -588,11 +549,6 @@ pub fn markup_escape_text(text: &str) -> crate::GString {
588549
unsafe { from_glib_full(ffi::g_markup_escape_text(text.to_glib_none().0, length)) }
589550
}
590551

591-
#[doc(alias = "g_mkdir")]
592-
pub fn mkdir(filename: impl AsRef<std::path::Path>, mode: i32) -> i32 {
593-
unsafe { ffi::g_mkdir(filename.as_ref().to_glib_none().0, mode) }
594-
}
595-
596552
#[doc(alias = "g_mkdir_with_parents")]
597553
pub fn mkdir_with_parents(pathname: impl AsRef<std::path::Path>, mode: i32) -> i32 {
598554
unsafe { ffi::g_mkdir_with_parents(pathname.as_ref().to_glib_none().0, mode) }
@@ -612,11 +568,6 @@ pub fn on_error_stack_trace(prg_name: &str) {
612568
}
613569
}
614570

615-
#[doc(alias = "g_open")]
616-
pub fn open(filename: impl AsRef<std::path::Path>, flags: i32, mode: i32) -> i32 {
617-
unsafe { ffi::g_open(filename.as_ref().to_glib_none().0, flags, mode) }
618-
}
619-
620571
#[doc(alias = "g_path_get_basename")]
621572
#[allow(dead_code)]
622573
pub(crate) fn path_get_basename(file_name: impl AsRef<std::path::Path>) -> std::path::PathBuf {
@@ -672,36 +623,13 @@ pub fn reload_user_special_dirs_cache() {
672623
}
673624
}
674625

675-
#[doc(alias = "g_remove")]
676-
pub fn remove(filename: impl AsRef<std::path::Path>) -> i32 {
677-
unsafe { ffi::g_remove(filename.as_ref().to_glib_none().0) }
678-
}
679-
680-
#[doc(alias = "g_rename")]
681-
pub fn rename(
682-
oldfilename: impl AsRef<std::path::Path>,
683-
newfilename: impl AsRef<std::path::Path>,
684-
) -> i32 {
685-
unsafe {
686-
ffi::g_rename(
687-
oldfilename.as_ref().to_glib_none().0,
688-
newfilename.as_ref().to_glib_none().0,
689-
)
690-
}
691-
}
692-
693626
#[doc(alias = "g_set_application_name")]
694627
pub fn set_application_name(application_name: &str) {
695628
unsafe {
696629
ffi::g_set_application_name(application_name.to_glib_none().0);
697630
}
698631
}
699632

700-
#[doc(alias = "g_set_prgname_once")]
701-
pub fn set_prgname_once(prgname: &str) -> bool {
702-
unsafe { from_glib(ffi::g_set_prgname_once(prgname.to_glib_none().0)) }
703-
}
704-
705633
//#[doc(alias = "g_set_user_dirs")]
706634
//pub fn set_user_dirs(first_dir_type: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
707635
// unsafe { TODO: call ffi:g_set_user_dirs() }
@@ -775,13 +703,6 @@ pub fn shell_unquote(
775703
}
776704
}
777705

778-
#[doc(alias = "g_slice_debug_tree_statistics")]
779-
pub fn slice_debug_tree_statistics() {
780-
unsafe {
781-
ffi::g_slice_debug_tree_statistics();
782-
}
783-
}
784-
785706
#[doc(alias = "g_spaced_primes_closest")]
786707
pub fn spaced_primes_closest(num: u32) -> u32 {
787708
unsafe { ffi::g_spaced_primes_closest(num) }
@@ -906,29 +827,6 @@ pub fn spawn_command_line_async(
906827
// unsafe { TODO: call ffi:g_stat() }
907828
//}
908829

909-
#[doc(alias = "g_trace_define_int64_counter")]
910-
pub fn trace_define_int64_counter(group: &str, name: &str, description: &str) -> u32 {
911-
unsafe {
912-
ffi::g_trace_define_int64_counter(
913-
group.to_glib_none().0,
914-
name.to_glib_none().0,
915-
description.to_glib_none().0,
916-
)
917-
}
918-
}
919-
920-
//#[doc(alias = "g_trace_mark")]
921-
//pub fn trace_mark(begin_time_nsec: i64, duration_nsec: i64, group: &str, name: &str, message_format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
922-
// unsafe { TODO: call ffi:g_trace_mark() }
923-
//}
924-
925-
#[doc(alias = "g_trace_set_int64_counter")]
926-
pub fn trace_set_int64_counter(id: u32, value: i64) {
927-
unsafe {
928-
ffi::g_trace_set_int64_counter(id, value);
929-
}
930-
}
931-
932830
//#[cfg(unix)]
933831
//#[cfg_attr(docsrs, doc(cfg(unix)))]
934832
//#[cfg(feature = "v2_64")]
@@ -957,11 +855,6 @@ pub fn usleep(microseconds: libc::c_ulong) {
957855
}
958856
}
959857

960-
//#[doc(alias = "g_utime")]
961-
//pub fn utime(filename: impl AsRef<std::path::Path>, utb: /*Unimplemented*/Option<Basic: Pointer>) -> i32 {
962-
// unsafe { TODO: call ffi:g_utime() }
963-
//}
964-
965858
#[doc(alias = "g_uuid_string_is_valid")]
966859
pub fn uuid_string_is_valid(str: &str) -> bool {
967860
unsafe { from_glib(ffi::g_uuid_string_is_valid(str.to_glib_none().0)) }

glib/sys/Gir.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ ignore = [
6767
[[object]]
6868
name = "GLib.*"
6969
status = "generate"
70+
[[object.function]]
71+
pattern = "trace_(define_int64_counter|set_int64_counter|mark)"
72+
# see https://gitlab.gnome.org/GNOME/glib/-/issues/3231
73+
ignore = true
74+
[[object.function]]
75+
pattern = "(fopen|creat|chmod|blow_chunks|utime|slice_debug_tree_statistics|rename|remove|open|mkdir|lstat|fsync|freopen|set_prgname_once)"
76+
# see https://gitlab.gnome.org/GNOME/glib/-/issues/3231 + majority of those are available through std
77+
ignore = true
7078
[[object.function]]
7179
name = "win32_locale_filename_from_utf8"
7280
cfg_condition = "windows"

0 commit comments

Comments
 (0)