]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-44731: Improve types of functions in the gzip module by \eta expansion to work...
authorDavid Scott <dave.scott@eu.citrix.com>
Tue, 12 Oct 2010 11:08:46 +0000 (12:08 +0100)
committerDavid Scott <dave.scott@eu.citrix.com>
Tue, 12 Oct 2010 11:08:46 +0000 (12:08 +0100)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
stdext/gzip.ml
stdext/gzip.mli

index 81828696765bc1ce948199c1e1c856fb21435839..b7484a813b17144f50c5d52c2ee222d94841289b 100644 (file)
@@ -75,7 +75,7 @@ let go (mode: zcat_mode) (input: input_type) fd f =
           )
       ) (fun () -> List.iter close !to_close)
 
-let compress = go Compress Active
-let decompress = go Decompress Active
+let compress fd f = go Compress Active fd f
+let decompress fd f = go Decompress Active fd f
 
-let decompress_passive = go Decompress Passive
+let decompress_passive fd f = go Decompress Passive fd f
index 9b87d0efa95e3bab63ddfa4bedc48bd3c3396fc7..b8613a3769e4dd8816e0adce4eda0f4a57dd9f18 100644 (file)
@@ -18,7 +18,7 @@ val compress: Unix.file_descr -> (Unix.file_descr -> unit) -> unit
 
 (** Runs a decompression process which is fed from a pipe whose entrance is passed to 'f'
     and whose output is 'ofd' *)
-val decompress: Unix.file_descr -> (Unix.file_descr -> unit) -> unit
+val decompress: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a
 
 (* Experimental decompressor which is fed from an fd and writes to a pipe *)
-val decompress_passive: Unix.file_descr -> (Unix.file_descr -> unit) -> unit
+val decompress_passive: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a