Module Obj.Ephemeron

Ephemeron with arbitrary arity and untyped

type obj_t = t;

alias for Obj.t

type t;

an ephemeron cf Ephemeron

let create: int => t;

create n returns an ephemeron with n keys. All the keys and the data are initially empty. The argument n must be between zero and max_ephe_length (limits included).

let length: t => int;

return the number of keys

let get_key: t => int => option(obj_t);
let get_key_copy: t => int => option(obj_t);
let set_key: t => int => obj_t => unit;
let unset_key: t => int => unit;
let check_key: t => int => bool;
let blit_key: t => int => t => int => int => unit;
let get_data: t => option(obj_t);
let get_data_copy: t => option(obj_t);
let set_data: t => obj_t => unit;
let unset_data: t => unit;
let check_data: t => bool;
let blit_data: t => t => unit;
let max_ephe_length: int;

Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain