package ctypes

  1. Overview
  2. Docs
type voidp = Ctypes_ptr.voidp
type ('m, 'a) fatptr = ('m, 'a Ctypes.typ) Ctypes_ptr.Fat.t
type ('m, 'a) fatfunptr = ('m, 'a Ctypes.fn) Ctypes_ptr.Fat.t
val make_structured : ('a, 's) Ctypes.structured Ctypes.typ -> managed_buffer -> ('a, 's) Ctypes.structured
val make_ptr : 'a Ctypes.typ -> voidp -> 'a Ctypes.ptr
val make_fun_ptr : 'a Ctypes.fn -> voidp -> 'a Ctypes_static.static_funptr
type 'a ocaml_type = 'a Ctypes_static.ocaml_type =
  1. | String : string ocaml_type
  2. | Bytes : bytes ocaml_type
  3. | FloatArray : float array ocaml_type
type 'a typ = 'a Ctypes_static.typ =
  1. | Void : unit typ
  2. | Primitive : 'a Ctypes_primitive_types.prim -> 'a typ
  3. | Pointer : 'a typ -> 'a ptr typ
  4. | Funptr : 'a Ctypes.fn -> 'a static_funptr typ
  5. | Struct : 'a Ctypes_static.structure_type -> 'a Ctypes_static.structure typ
  6. | Union : 'a Ctypes_static.union_type -> 'a Ctypes_static.union typ
  7. | Abstract : Ctypes_static.abstract_type -> 'a Ctypes_static.abstract typ
  8. | View : ('a, 'b) view -> 'a typ
  9. | Qualified : Ctypes_static.qualifier * 'a typ -> 'a typ
  10. | Array : 'a typ * int -> 'a Ctypes_static.carray typ
  11. | Bigarray : (_, 'a, _) Ctypes_bigarray.t -> 'a typ
  12. | OCaml : 'a ocaml_type -> 'a ocaml typ
and ('a, 'b) pointer = ('a, 'b) Ctypes_static.pointer =
  1. | CPointer : (Obj.t option, 'a typ) Ctypes_ptr.Fat.t -> ('a, [ `C ]) pointer
  2. | OCamlRef : int * 'a * 'a ocaml_type -> ('a, [ `OCaml ]) pointer
and 'a ptr = ('a, [ `C ]) pointer
and 'a ocaml = ('a, [ `OCaml ]) pointer
and 'a static_funptr = 'a Ctypes_static.static_funptr =
  1. | Static_funptr : (Obj.t option, 'a Ctypes.fn) Ctypes_ptr.Fat.t -> 'a static_funptr
and ('a, 'b) view = ('a, 'b) Ctypes_static.view = {
  1. read : 'b -> 'a;
  2. write : 'a -> 'b;
  3. format_typ : ((Format.formatter -> unit) -> Format.formatter -> unit) option;
  4. format : (Format.formatter -> 'a -> unit) option;
  5. ty : 'b typ;
}
type 'a fn = 'a Ctypes_static.fn =
  1. | Returns : 'a typ -> 'a fn
  2. | Function : 'a typ * 'b fn -> ('a -> 'b) fn
type 'a prim = 'a Ctypes_primitive_types.prim =
  1. | Char : char prim
  2. | Schar : int prim
  3. | Uchar : Unsigned.uchar prim
  4. | Bool : bool prim
  5. | Short : int prim
  6. | Int : int prim
  7. | Long : Signed.long prim
  8. | Llong : Signed.llong prim
  9. | Ushort : Unsigned.ushort prim
  10. | Sint : Signed.sint prim
  11. | Uint : Unsigned.uint prim
  12. | Ulong : Unsigned.ulong prim
  13. | Ullong : Unsigned.ullong prim
  14. | Size_t : Unsigned.size_t prim
  15. | Int8_t : int prim
  16. | Int16_t : int prim
  17. | Int32_t : int32 prim
  18. | Int64_t : int64 prim
  19. | Uint8_t : Unsigned.uint8 prim
  20. | Uint16_t : Unsigned.uint16 prim
  21. | Uint32_t : Unsigned.uint32 prim
  22. | Uint64_t : Unsigned.uint64 prim
  23. | Camlint : int prim
  24. | Nativeint : nativeint prim
  25. | Float : float prim
  26. | Double : float prim
  27. | LDouble : LDouble.t prim
  28. | Complex32 : Complex.t prim
  29. | Complex64 : Complex.t prim
  30. | Complexld : ComplexL.t prim
val build_enum_type : string -> Ctypes_static.arithmetic -> ?typedef:bool -> ?unexpected:(int64 -> 'a) -> ('a * int64) list -> 'a typ
val use_value : 'a -> unit
OCaml

Innovation. Community. Security.