Skip to content

Commit

Permalink
Make sure to pass cleanup to wrap_in or wrap_out.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Tryzelaar authored and thelema committed Dec 22, 2009
1 parent 48c9d78 commit 108ed0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/extlib/extUnix.ml
Expand Up @@ -72,14 +72,14 @@ struct
*) *)


let input_of_descr ?autoclose ?cleanup fd = let input_of_descr ?autoclose ?cleanup fd =
wrap_in ?autoclose (in_channel_of_descr fd) wrap_in ?autoclose ?cleanup (in_channel_of_descr fd)


let descr_of_input cin = let descr_of_input cin =
try descr_of_in_channel (input_get cin) try descr_of_in_channel (input_get cin)
with Not_found -> raise (Invalid_argument "Unix.descr_of_in_channel") with Not_found -> raise (Invalid_argument "Unix.descr_of_in_channel")


let output_of_descr ?cleanup fd = let output_of_descr ?cleanup fd =
wrap_out (out_channel_of_descr fd) wrap_out ?cleanup (out_channel_of_descr fd)


let descr_of_output cout = let descr_of_output cout =
try descr_of_out_channel (output_get (cast_output cout)) try descr_of_out_channel (output_get (cast_output cout))
Expand Down

0 comments on commit 108ed0a

Please sign in to comment.