]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libarchive: Fix a few binding errors
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 28 Feb 2022 11:12:56 +0000 (12:12 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 28 Feb 2022 11:12:56 +0000 (12:12 +0100)
vapi/libarchive.vapi

index eefd32c3db32e5c46cf05c6fe38f52322498bd70..c3cccd3fc50cff5ce024a8b80a023c084455bd36 100644 (file)
@@ -225,7 +225,7 @@ namespace Archive {
                [CCode (cname="archive_read_data_into_fd")]
                public Result read_data_into_fd (int fd);
 
-               public Result extract (Entry entry, ExtractFlags? flags=0);
+               public Result extract (Entry entry, ExtractFlags flags = 0);
                public Result extract2 (Entry entry, Write dest);
                public void extract_set_progress_callback (ExtractProgressCallback cb);
                public void extract_set_skip_file (int64_t dev, int64_t ino);
@@ -245,21 +245,21 @@ namespace Archive {
                public Result set_standard_lookup ();
 
                // HACK, they have no name in C. May not work correctly.
-               [CCode (instance_pos = 0, cname="void")]
+               [CCode (has_type_def = false, instance_pos = 0)]
                public delegate unowned string GNameLookup (int64_t gid);
-               [CCode (instance_pos = 0, cname="void")]
+               [CCode (has_type_def = false, instance_pos = 0)]
                public delegate unowned string UNameLookup (int64_t uid);
-               [CCode (instance_pos = 0, cname="void")]
+               [CCode (has_type_def = false, instance_pos = 0)]
                public delegate void Cleanup ();
 
                public Result set_gname_lookup (
-                       GNameLookup lookup,
-                       Cleanup? cleanup = null
+                       [CCode (delegate_target_pos = 0.9)] GNameLookup lookup,
+                       [CCode (delegate_target_pos = 0.9)] Cleanup? cleanup = null
                );
 
                public Result set_uname_lookup (
-                       UNameLookup lookup,
-                       Cleanup? cleanup = null
+                       [CCode (delegate_target_pos = 0.9)] UNameLookup lookup,
+                       [CCode (delegate_target_pos = 0.9)] Cleanup? cleanup = null
                );
        }
 
@@ -471,9 +471,11 @@ namespace Archive {
                public Result xattr_next(out unowned string name, out void* value, out size_t size);
 
                [Compact]
+               [CCode (lower_case_cprefix = "archive_entry_linkresolver_")]
                public class LinkResolver {
                        public LinkResolver ();
                        public void set_strategy (Format format_code);
+                       [CCode (cname = "archive_entry_linkify")]
                        public void linkify (Entry a, Entry b);
                }
        }