sig
  val foreign :
    ?abi:Libffi_abi.abi ->
    ?from:Dl.library ->
    ?stub:bool ->
    ?check_errno:bool ->
    ?release_runtime_lock:bool -> string -> ('-> 'b) Ctypes.fn -> '-> 'b
  val foreign_value :
    ?from:Dl.library -> string -> 'Ctypes.typ -> 'Ctypes.ptr
  val funptr :
    ?abi:Libffi_abi.abi ->
    ?name:string ->
    ?check_errno:bool ->
    ?runtime_lock:bool ->
    ?thread_registration:bool ->
    ('-> 'b) Ctypes.fn -> ('-> 'b) Ctypes.typ
  val funptr_opt :
    ?abi:Libffi_abi.abi ->
    ?name:string ->
    ?check_errno:bool ->
    ?runtime_lock:bool ->
    ?thread_registration:bool ->
    ('-> 'b) Ctypes.fn -> ('-> 'b) option Ctypes.typ
  exception CallToExpiredClosure
  module type Funptr =
    sig
      type fn
      type t
      val t : Foreign.Funptr.t Ctypes.typ
      val t_opt : Foreign.Funptr.t option Ctypes.typ
      val free : Foreign.Funptr.t -> unit
      val of_fun : Foreign.Funptr.fn -> Foreign.Funptr.t
      val with_fun : Foreign.Funptr.fn -> (Foreign.Funptr.t -> 'c) -> 'c
    end
  val dynamic_funptr :
    ?abi:Libffi_abi.abi ->
    ?runtime_lock:bool ->
    ?thread_registration:bool ->
    ('-> 'b) Ctypes.fn -> (module Foreign.Funptr with type fn = '-> 'b)
  val report_leaked_funptr : (string -> unit) Stdlib.ref
end