defcvar
.
The function get-var-pointer
will return a pointer to the
foreign global variable symbol previously defined with
defcvar
.
CFFI> (defcvar "errno" :int :read-only t) => *ERRNO* CFFI> *errno* => 25 CFFI> (get-var-pointer '*errno*) => #<A Mac Pointer #xA0008130> CFFI> (mem-ref * :int) => 25