The ABI to use for ffi calls. The abi value is platform dependent and there's no known way to get the default ABI generically at runtime. aarch64 seems to be 1. x86 seems to be 2.
The ABI to use for ffi calls. The abi value is platform dependent and there's no known way to get the default ABI generically at runtime. aarch64 seems to be 1. x86 seems to be 2.
(->address o)
Coerce a container to a pointer, but keep a reference to the container in pool
Coerce a container to a pointer, but keep a reference to the container in *pool*
(-main & args)
(add-cleaner! o cleanup)
(call fname ret-type & types-and-args)
Calls a c function with fname. Function must be
already linked or loaded using load-library
.
fname: String name of the function ret-type: keyword return type of the function. See types below. types-and-args: pairs of <arg-type> <arg-value>. See types below.
Types:
Same as dtype-next. :void :pointer :pointer? :int8 :int16 :int32 :int64 :float32 :float64
Example:
(call "cosf" :float32 :float32 42)
Calls a c function with fname. Function must be already linked or loaded using `load-library`. fname: String name of the function ret-type: keyword return type of the function. See types below. types-and-args: pairs of <arg-type> <arg-value>. See types below. Types: Same as dtype-next. :void :pointer :pointer? :int8 :int16 :int32 :int64 :float32 :float64 Example: (call "cosf" :float32 :float32 42)
(call-ptr fptr ret-type & types-and-args)
Calls a c function pounter.
fptr: The function pointer ret-type: keyword return type of the function. See types below. types-and-args: pairs of <arg-type> <arg-value>. See types below.
Types:
Same as dtype-next. :void :pointer :pointer? :int8 :int16 :int32 :int64 :float32 :float64
Example:
(call-ptr ptr :float32 :float32 42)
Calls a c function pounter. fptr: The function pointer ret-type: keyword return type of the function. See types below. types-and-args: pairs of <arg-type> <arg-value>. See types below. Types: Same as dtype-next. :void :pointer :pointer? :int8 :int16 :int32 :int64 :float32 :float64 Example: (call-ptr ptr :float32 :float32 42)
(ffi_prep_cif cif abi nargs rettype argtypes)
No documentation!
No documentation!
(load-library libname)
Loads a shared library.
<libname> can be either a lib name "ffi" or a path to a shared library.
Loads a shared library. <libname> can be either a lib name "ffi" or a path to a shared library.
(long->pointer n)
(make-cif ret-type arg-types)
(make-ptr-uninitialized dtype)
(make-ptr-uninitialized dtype options)
Make an object convertible to a pointer that points to single value of type
dtype
.
Make an object convertible to a pointer that points to single value of type `dtype`.
(ptr-array ptrs)
(ref! o)
(struct-def->ffi-type sdef)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close