package ctypes

  1. Overview
  2. Docs
Combinators for binding to C libraries without writing any C

Install

Dune Dependency

Authors

Maintainers

Sources

0.23.0.tar.gz
sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1
md5=b1af973ec9cf7867a63714e92df82f2a

doc/ctypes.stubs/Cstubs_c_language/index.html

Module Cstubs_c_languageSource

Sourceval fresh_var : ?prefix:string -> unit -> string
Sourcetype ty =
  1. | Ty : _ Ctypes_static.typ -> ty
Sourcetype tfn =
  1. | Fn : _ Ctypes_static.fn -> tfn
Sourcetype fieldname = string
Sourcetype cfunction = {
  1. fname : string;
  2. allocates : bool;
  3. reads_ocaml_heap : bool;
  4. fn : tfn;
}
Sourcetype cglobal = {
  1. name : string;
  2. typ : ty;
  3. references_ocaml_heap : bool;
}
Sourcetype clocal = [
  1. | `Local of string * ty
]
Sourcetype cvar = [
  1. | clocal
  2. | `Global of cglobal
]
Sourcetype storage_class = [
  1. | `Static
  2. | `Extern
]
Sourcetype cconst = [
  1. | `Int of Signed.sint
]
Sourcetype cexp = [
  1. | cconst
  2. | clocal
  3. | `Cast of ty * cexp
  4. | `Addr of cvar
]
Sourcetype clvalue = [
  1. | cvar
  2. | `Index of clvalue * cexp
  3. | `Field of clvalue * fieldname
  4. | `PointerField of clvalue * fieldname
]
Sourcetype camlop = [
  1. | `CAMLparam0
  2. | `CAMLlocalN of cexp * cexp
  3. | `CAMLdrop
]
Sourcetype ceff = [
  1. | cexp
  2. | camlop
  3. | `Global of cglobal
  4. | `App of cfunction * cexp list
  5. | `Index of ceff * cexp
  6. | `Deref of cexp
  7. | `DerefField of cexp * fieldname
]
Sourcetype cbind = clocal * ceff
Sourcetype ccomp = [
  1. | ceff
  2. | `CAMLparam of string list * ccomp
  3. | `LetConst of clocal * cconst * ccomp
  4. | `LetAssign of clvalue * ceff * ccomp
  5. | `CAMLreturnT of ty * cexp
  6. | `Return of ty * cexp
  7. | `Let of cbind * ccomp
]
Sourcetype cfundec = [
  1. | `Fundec of string * (string * ty) list * ty
]
Sourcetype cfundef = [
  1. | `Function of cfundec * ccomp * storage_class
]
Sourceval return_type : 'a. 'a Ctypes_static.fn -> ty
Sourceval args : 'a. 'a Ctypes_static.fn -> (string * ty) list
Sourcemodule Type_C : sig ... end
Sourceval reader : string -> 'a Ctypes_static.fn -> cfunction
Sourceval conser : string -> 'a Ctypes_static.fn -> cfunction
Sourceval immediater : string -> 'a Ctypes_static.fn -> cfunction
Sourcemodule Unchecked_function_types : sig ... end
OCaml

Innovation. Community. Security.