1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use core::mlvalues::{Size, Tag, Value};
extern "C" {
pub fn caml_alloc(size: Size, tag: Tag) -> Value;
pub fn caml_alloc_small(size: Size, tag: Tag) -> Value;
pub fn caml_alloc_tuple(size: Size) -> Value;
pub fn caml_alloc_string(size: Size) -> Value;
pub fn caml_copy_string(string: *const u8) -> Value;
pub fn caml_copy_string_array(arr: *const *const u8) -> Value;
pub fn caml_is_double_array(v: Value) -> i32;
pub fn caml_copy_double(double: f64) -> Value;
pub fn caml_copy_int32(int: i32) -> Value;
pub fn caml_copy_int64(int: i64) -> Value;
pub fn caml_copy_nativeint(int: isize) -> Value;
pub fn caml_alloc_array(
value: (unsafe extern "C" fn(*const u8) -> Value),
array: *mut *mut u8,
) -> Value;
pub fn caml_alloc_final(
size: Size,
final_fn: extern "C" fn(Value),
consumed: Size,
max: Size,
) -> Value;
}