Previous: defcallback, Up: Callbacks


get-callback

Syntax

— Accessor: get-callback symbol ⇒ pointer

Arguments and Values

symbol
A symbol denoting a callback.
pointer
A pointer.

Description

This is the functional version of the callback macro. It returns a pointer to the callback named by symbol suitable, for example, to pass as arguments to foreign functions.

Examples

  CFFI> (defcallback sum :int ((a :int) (b :int))
          (+ a b))
  => SUM
  CFFI> (get-callback 'sum)
  => #<A Mac Pointer #x102350>

See Also

callback
defcallback