Hi,
I have a naive question about file descriptors and C interface (when interfacing C with OCaml).
For instance, a file.ml file which looks like:
external my_c_interface : out_channel -> int = c_function
where c_function writes something to a file and return the number of written char.
The c_function takes a FILE* file descriptor, as for example:
CAMLprim value c_function (value channel)
{
CAMLparam1 (channel);
FILE* fd = ???;
CAMLreturn (Val_int (call_to_c_func (fd)));
}
So, if possible, how to convert the ‘value channel’ to a ‘FILE*’?
Thanks for your help,
Laurent
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs