[Invoking a variadic C argument from OCaml]
Assuming a Linux system, you could lazily generate the glue code and
invoke dynamic linker on it. So the general case would be to call the
code generator.
On linux and x86, I could probably use an array where I would move by
sizeof(some_type). I really want portability however (I want to use
these bindings at least on windows too).
It might be worth investigating the "libffi" library. If I guess
correctly, it lets you synthesize calls to native C functions when the
number and type of arguments are statically unknown.
- Xavier Leroy
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs