Module Base__Obj_array
This module is not exposed for external use, and is only here for the implementation of Uniform_array internally. Obj.t Uniform_array.t should be used in place of Obj_array.t.
val sexp_of_t : t -> Base.Sexp.t
include Base.Blit.S with type t := t
val subo : ?pos:int -> ?len:int -> t -> tval sub : t -> pos:int -> len:int -> tval unsafe_blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unitval blito : src:t -> ?src_pos:int -> ?src_len:int -> dst:t -> ?dst_pos:int -> unit -> unitval blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit
include Base.Invariant.S with type t := t
val invariant : t -> unit
val create : len:int -> Caml.Obj.t -> tcreate ~len xreturns an obj-array of lengthlen, all of whose indices have valuex.
val create_zero : len:int -> tcreate_zero ~lenreturns an obj-array of lengthlen, all of whose indices have valueCaml.Obj.repr 0.
val singleton : Caml.Obj.t -> tval empty : tval length : t -> intval get : t -> int -> Caml.Obj.tget t iandunsafe_get t ireturn the object at indexi.set t i oandunsafe_set t i oset indexitoo. In no case is the object copied. Theunsafe_*variants omit the bounds check ofi.
val unsafe_get : t -> int -> Caml.Obj.tval set : t -> int -> Caml.Obj.t -> unitval unsafe_set : t -> int -> Caml.Obj.t -> unitval swap : t -> int -> int -> unitval unsafe_set_assuming_currently_int : t -> int -> Caml.Obj.t -> unitunsafe_set_assuming_currently_int t i objsets indexiofttoobj, but only works correctly ifCaml.Obj.is_int (get t i). This precondition saves a dynamic check.unsafe_set_int_assuming_currently_intis similar, except the value being set is an int.unsafe_set_intis similar but does not assume anything about the target.
val unsafe_set_int_assuming_currently_int : t -> int -> int -> unitval unsafe_set_int : t -> int -> int -> unitval unsafe_set_omit_phys_equal_check : t -> int -> Caml.Obj.t -> unitunsafe_set_omit_phys_equal_checkis likeunsafe_set, except it doesn't do aphys_equalcheck to try to skipcaml_modify. It is safe to call this even if the values arephys_equal.
val unsafe_clear_if_pointer : t -> int -> unitunsafe_clear_if_pointer t ipreventst.(i)from pointing to anything to prevent space leaks. It does this by settingt.(i)toCaml.Obj.repr 0. As a performance hack, it only does this whennot (Caml.Obj.is_int t.(i)).
val truncate : t -> len:int -> unittruncate t ~lenshortenst's length tolen. It is an error iflen <= 0orlen > length t.