From 3d8d5ce53e08b5b47be424bf8a6d59029a300463 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Tue, 25 Aug 2020 23:45:32 +0200 Subject: [PATCH] Disable some irrelevant functions --- rust-bindings/rust/conf/ostree.toml | 9 +++++++-- rust-bindings/rust/src/auto/functions.rs | 8 -------- rust-bindings/rust/src/auto/versions.txt | 2 +- rust-bindings/rust/sys/src/auto/versions.txt | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/rust-bindings/rust/conf/ostree.toml b/rust-bindings/rust/conf/ostree.toml index 69a1c5cc..8b905fcd 100644 --- a/rust-bindings/rust/conf/ostree.toml +++ b/rust-bindings/rust/conf/ostree.toml @@ -195,8 +195,13 @@ status = "generate" name = "OSTree.*" status = "generate" [[object.function]] - # both too low-level to be generated safely - pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes" + # low-level functions with unsafe APIs + pattern = "cmp_checksum_bytes|checksum_inplace_to_bytes|hash_object_name" + ignore = true + + [[object.function]] + # private API + pattern = "cmd__private__" ignore = true [[object.constant]] diff --git a/rust-bindings/rust/src/auto/functions.rs b/rust-bindings/rust/src/auto/functions.rs index 9ae950ec..82e398b6 100644 --- a/rust-bindings/rust/src/auto/functions.rs +++ b/rust-bindings/rust/src/auto/functions.rs @@ -98,10 +98,6 @@ pub fn checksum_to_bytes_v(checksum: &str) -> Option { } } -//pub fn cmd__private__() -> /*Ignored*/Option { -// unsafe { TODO: call ostree_sys:ostree_cmd__private__() } -//} - #[cfg(any(feature = "v2018_2", feature = "dox"))] pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option { unsafe { @@ -192,10 +188,6 @@ pub fn gpg_error_quark() -> glib::Quark { } } -//pub fn hash_object_name(a: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ostree_sys:ostree_hash_object_name() } -//} - pub fn metadata_variant_type(objtype: ObjectType) -> Option { unsafe { from_glib_none(ostree_sys::ostree_metadata_variant_type(objtype.to_glib())) diff --git a/rust-bindings/rust/src/auto/versions.txt b/rust-bindings/rust/src/auto/versions.txt index 48860c45..85a1b25d 100644 --- a/rust-bindings/rust/src/auto/versions.txt +++ b/rust-bindings/rust/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1) -from gir-files (https://github.com/gtk-rs/gir-files @ 9b77077+) +from gir-files (https://github.com/gtk-rs/gir-files @ eec42a9) diff --git a/rust-bindings/rust/sys/src/auto/versions.txt b/rust-bindings/rust/sys/src/auto/versions.txt index 48860c45..85a1b25d 100644 --- a/rust-bindings/rust/sys/src/auto/versions.txt +++ b/rust-bindings/rust/sys/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1) -from gir-files (https://github.com/gtk-rs/gir-files @ 9b77077+) +from gir-files (https://github.com/gtk-rs/gir-files @ eec42a9)