Hi all,
After browsing through ocaml code I figured out the
following:
1. CAMLprim is for the functions to be exported and accessed from
ocaml code (functions that return “value”)
2. CAMLexport is for the functions called from C code.
3. CAMLextern is for the function declarations in headers when C code
is hairy and consists of several modules.
4. CAMLprim usage is presented as a Good Thing for all
the external code
in the reference manual but it is not even mentioned in the Oreilly book.
5. CAMLprim & CAMLexport usage are expecially important
when messing
with windows dll’s, but I’ve never worked with dll’s and can’t
understand how
to use it.
Can this information be added in the reference manual (if it is correct)?
Mikhail