[−][src]Macro ocaml_interop::ocaml_alloc
Calls an OCaml allocator function.
Useful for calling functions that construct new values and never raise an exception.
It is used internally by the to_ocaml!
macro, and may be used directly only in rare occasions.
Examples
let hello_string = "hello OCaml!"; ocaml_frame!(gc, { let ocaml_string: OCaml<String> = ocaml_alloc!(hello_string.to_ocaml(gc)); // ... });