conf: annotate ignores better

This commit is contained in:
Felix Krull 2020-08-26 21:44:57 +02:00 committed by Colin Walters
parent 19076fe6d8
commit 6f05869713
4 changed files with 33 additions and 64 deletions

View File

@ -1,3 +1,8 @@
# Legend:
# - [IGNORE] we don't want to autogenerate this
# - [MANUAL] we have manual wrappers for this, but would prefer to autogenerate it
# - [FAIL] this is currently disabled because it generates broken code
[options]
work_mode = "normal"
library = "OSTree"
@ -78,7 +83,7 @@ manual = [
"GLib.Variant",
"GLib.VariantType",
# types implemented by hand
# [MANUAL] types implemented by hand
"OSTree.KernelArgs",
"OSTree.RepoCheckoutAtOptions",
"OSTree.RepoCheckoutFilter",
@ -121,12 +126,12 @@ os_tree = "ostree"
name = "OSTree.CollectionRef"
status = "generate"
[[object.function]]
# helper functions for NULL-terminated arrays
# [IGNORE] helper functions for NULL-terminated arrays
pattern = "dupv|freev"
ignore = true
[[object.function]]
# clone() should already be this
# [IGNORE] clone() should already be this
name = "dup"
ignore = true
@ -134,17 +139,17 @@ status = "generate"
name = "OSTree.Repo"
status = "generate"
[[object.function]]
# this one generates a guchar** incorrectly
# [FAIL] this one generates a guchar** incorrectly
name = "write_content_async"
ignore = true
[[object.function]]
# these fail because of issues with arrays of dubious lifetimes
# [FAIL] these fail because of issues with arrays of dubious lifetimes
pattern = "find_remotes_async|pull_from_remotes_async"
ignore = true
[[object.function]]
# this is deprecated and supposedly unsafe for GI
# [IGNORE] this is deprecated and supposedly unsafe for GI
name = "checkout_tree_at"
ignore = true
@ -161,7 +166,7 @@ status = "generate"
name = "OSTree.RepoFinder"
status = "generate"
[[object.function]]
# these fail because of issues with arrays of dubious lifetimes
# [FAIL] these fail because of issues with arrays of dubious lifetimes/NULL-terminated arrays
pattern = "resolve_async|resolve_all_async"
ignore = true
@ -169,12 +174,12 @@ status = "generate"
name = "OSTree.RepoFinderResult"
status = "generate"
[[object.function]]
# array helper function
# [IGNORE] array helper function
name = "freev"
ignore = true
[[object.function]]
# clone() should already be this
# [IGNORE] clone() should already be this
name = "dup"
ignore = true
@ -188,7 +193,7 @@ clear_function_expression = "|_ptr| ()"
name = "OSTree.SePolicy"
status = "generate"
[[object.function]]
# has an unused raw pointer parameter so we wrap it by hand
# [IGNORE] has an unused raw pointer parameter
name = "fscreatecon_cleanup"
ignore = true
@ -196,6 +201,7 @@ status = "generate"
name = "OSTree.Sign"
status = "generate"
[[object.function]]
# [IGNORE] these shouldn't be on this type, they belong to subclasses
pattern = "dummy_.+|ed25519_.+"
ignore = true
@ -212,21 +218,31 @@ status = "generate"
name = "OSTree.*"
status = "generate"
[[object.function]]
# low-level functions with unsafe APIs
pattern = "cmp_checksum_bytes|checksum_inplace_from_bytes|checksum_inplace_to_bytes|checksum_b64_inplace_from_bytes|checksum_b64_inplace_to_bytes|hash_object_name"
# [MANUAL] probably can't be autogenerated because of the custom Checksum type
pattern = "checksum_file|checksum_file_async|checksum_file_at|checksum_file_from_input"
ignore = true
[[object.function]]
# private API
# [IGNORE] low-level checksum functions, we have a custom checksum API
pattern = "cmp_checksum_bytes|checksum_from_bytes|checksum_to_bytes|checksum_inplace_from_bytes|checksum_inplace_to_bytes|checksum_b64_from_bytes|checksum_b64_to_bytes|checksum_b64_inplace_from_bytes|checksum_b64_inplace_to_bytes"
ignore = true
[[object.function]]
# [IGNORE] needs custom handling to deal with its raw pointer parameter
pattern = "hash_object_name"
ignore = true
[[object.function]]
# [IGNORE] private API
pattern = "cmd__private__"
ignore = true
[[object.constant]]
# version-dependent constants
# [IGNORE] version-dependent constants
pattern = "VERSION|VERSION_S|YEAR_VERSION|RELEASE_VERSION"
ignore = true
[[object.constant]]
# build-dependent constants
# [IGNORE] build-dependent constants
pattern = "BUILT_FEATURES"
ignore = true

View File

@ -33,16 +33,6 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
}
}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<GString> {
// unsafe { TODO: call ostree_sys:ostree_checksum_b64_from_bytes() }
//}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
// unsafe { TODO: call ostree_sys:ostree_checksum_b64_to_bytes() }
//}
//pub fn checksum_bytes_peek(bytes: &glib::Variant) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
// unsafe { TODO: call ostree_sys:ostree_checksum_bytes_peek() }
//}
@ -51,43 +41,6 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
// unsafe { TODO: call ostree_sys:ostree_checksum_bytes_peek_validate() }
//}
//pub fn checksum_file<P: IsA<gio::File>, Q: IsA<gio::Cancellable>>(f: &P, objtype: ObjectType, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&Q>) -> Result<(), glib::Error> {
// unsafe { TODO: call ostree_sys:ostree_checksum_file() }
//}
//pub fn checksum_file_async<P: IsA<gio::File>, Q: IsA<gio::Cancellable>, R: FnOnce(Result<(), glib::Error>) + 'static>(f: &P, objtype: ObjectType, io_priority: i32, cancellable: Option<&Q>, callback: R) {
// unsafe { TODO: call ostree_sys:ostree_checksum_file_async() }
//}
//#[cfg(any(feature = "v2017_13", feature = "dox"))]
//pub fn checksum_file_at<P: IsA<gio::Cancellable>>(dfd: i32, path: &str, stbuf: /*Unimplemented*/Option<Fundamental: Pointer>, objtype: ObjectType, flags: ChecksumFlags, out_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
// unsafe { TODO: call ostree_sys:ostree_checksum_file_at() }
//}
//pub fn checksum_file_from_input<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, in_: Option<&P>, objtype: ObjectType, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&Q>) -> Result<(), glib::Error> {
// unsafe { TODO: call ostree_sys:ostree_checksum_file_from_input() }
//}
//pub fn checksum_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<GString> {
// unsafe { TODO: call ostree_sys:ostree_checksum_from_bytes() }
//}
pub fn checksum_from_bytes_v(csum_v: &glib::Variant) -> Option<GString> {
unsafe {
from_glib_full(ostree_sys::ostree_checksum_from_bytes_v(csum_v.to_glib_none().0))
}
}
//pub fn checksum_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
// unsafe { TODO: call ostree_sys:ostree_checksum_to_bytes() }
//}
pub fn checksum_to_bytes_v(checksum: &str) -> Option<glib::Variant> {
unsafe {
from_glib_full(ostree_sys::ostree_checksum_to_bytes_v(checksum.to_glib_none().0))
}
}
#[cfg(any(feature = "v2018_2", feature = "dox"))]
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<GString> {
unsafe {

View File

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
from gir-files (https://github.com/gtk-rs/gir-files @ ac0d3c9)
from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)

View File

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
from gir-files (https://github.com/gtk-rs/gir-files @ ac0d3c9)
from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)