]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
bzlib: Add bzalloc/bzfree fields to Stream
authorJakub Kaszycki <kuba@kaszycki.net.pl>
Fri, 16 Mar 2018 20:16:00 +0000 (21:16 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Apr 2018 16:15:33 +0000 (18:15 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=794409

vapi/bzlib.vapi

index 844442dd8974a7f686f8a8ea8fc6643ad315cf87..e75c10acb1bf45f24658ee649a03a44ca907f93b 100644 (file)
@@ -57,6 +57,8 @@ namespace BZLib {
                public uint totoal_out_lo32;
                public uint total_out_hi32;
                public void *state;
+               public AllocFunc? bzalloc;
+               public FreeFunc? bzfree;
                public void *opaque;
                [CCode (cname = "BZ2_bzCompressInit")]
                public Status compress_init (int block_size_100k, int verbosity, int work_factor);
@@ -81,4 +83,10 @@ namespace BZLib {
                public int write (uint8[] buf);
                public unowned string error (out Status status);
        }
+
+       [CCode (has_target = false, has_typedef = false)]
+       public delegate void* AllocFunc (void* target, int m, int n);
+
+       [CCode (has_target = false, has_typedef = false)]
+       public delegate void FreeFunc (void* target, void* p);
 }