Next: mem-aref, Previous: make-pointer, Up: Pointers [Contents][Index]
A foreign pointer.
A foreign type.
An integer.
A Lisp value compatible with type.
The mem-aptr
function finds the pointer to an element of the array.
(mem-aptr ptr type n) ;; is identical to: (inc-pointer ptr (* n (foreign-type-size type)))
CFFI> (with-foreign-string (str "Hello, foreign world!") (mem-aptr str :char 6)) ⇒ #.(SB-SYS:INT-SAP #X0063D4B6)