Next: foreign-funcall-varargs, Previous: foreign-funcall, Up: Functions [Contents][Index]
arguments ::= { arg-type arg }* [return-type]
options ::= (&key convention)
A foreign pointer.
A foreign type.
An argument of type arg-type.
A foreign type, :void
by default.
A lisp object.
One of :cdecl
(default) or :stdcall
.
The foreign-funcall
macro is the main primitive for calling
foreign functions.
Note: The return value of foreign-funcall on functions with a :void return type is still undefined.
foreign-funcall
. On
implementations that don’t support foreign-funcall
cffi-sys::no-foreign-funcall
will be present in
*features*
. Note: in these Lisps you can still use the
defcfun
interface.
CFFI> (foreign-funcall-pointer (foreign-symbol-pointer "abs") ()
:int -42 :int)
⇒ 42