]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
bzlib: add BZFILE binding
authorAndre Masella <andre.p.masella@gmail.com>
Fri, 23 Sep 2011 02:03:57 +0000 (19:03 -0700)
committerJürg Billeter <j@bitron.ch>
Wed, 30 Nov 2011 13:04:31 +0000 (14:04 +0100)
Fixes bug 656710.

vapi/bzlib.vapi

index 9c061dec38e083c352cfd7946b1b94b576319582..726b6cc839e4feddd1cf65a53a71a6870c8a77d4 100644 (file)
@@ -71,4 +71,14 @@ namespace BZLib {
                [CCode (cname = "BZ2_bzDecompressEnd")]
                public Status decompress_end ();
        }
+
+       [CCode (cname = "BZFILE", cprefix = "BZ2_bz", free_function = "BZ2_bzclose")]
+       [Compact]
+       public class BZFileStream {
+               public static BZFileStream open (string path, string mode = "rb");
+               public static BZFileStream dopen (int fd, string mode);
+               public int read (uint8[] buf);
+               public int write (uint8[] buf);
+               public unowned string error (out Status status);
+       }
 }