]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
zlib: Fix some bindings errors
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 6 Apr 2021 19:40:58 +0000 (21:40 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 8 Apr 2021 06:35:58 +0000 (08:35 +0200)
vapi/zlib.vapi

index 6f76ba9412bdbb9d6d5f8f1ab14d65aca0a1ba2a..c9adb8e247197d1bac97024ca8df7538d78160fa 100644 (file)
@@ -23,8 +23,6 @@
  *     Jörn Magens <joernmagens@gmx.de>
  */
 
-using GLib;
-
 [CCode (lower_case_cprefix = "", cheader_filename = "zlib.h")]
 namespace ZLib {
        [CCode (cname="int", cprefix="Z_", has_type_id = false)]
@@ -141,8 +139,11 @@ namespace ZLib {
                public int set_dictionary ([CCode (array_length_type = "guint")] uint8[] dictionary);
                [CCode (cname = "inflateSync")]
                public int sync ();
+               [CCode (cname = "inflateReset")]
                public int reset ();
+               [CCode (cname = "inflatePrime")]
                public int prime (int bits, int value);
+               [CCode (cname = "inflateGetHeader")]
                public int get_header (out GZHeader head);
        }
        [CCode (lower_case_cprefix = "", cheader_filename = "zlib.h")]
@@ -162,17 +163,17 @@ namespace ZLib {
                public int xflags;
                public int os;
                [CCode (array_length_cname = "extra_len", array_length_type = "guint")]
-               public uint8[] extra;
+               public unowned uint8[] extra;
                public uint extra_max;
-               public string? name;
+               public unowned string? name;
                public uint name_max;
-               public string comment;
+               public unowned string comment;
                [CCode (cname = "comm_max")]
                public uint comment_max;
                public int hcrc;
                public int done;
        }
-       [CCode (cname = "gzFile", cprefix = "gz", free_function = "gzclose")]
+       [CCode (cname = "struct gzFile_s", cprefix = "gz", free_function = "gzclose")]
        [Compact]
        public class GZFileStream {
                public static GZFileStream open (string path, string mode = "rb");