Next: make-pointer, Previous: inc-pointer, Up: Pointers
setf
place.
The incf-pointer
macro takes the foreign pointer from
place and creates a new-pointer incremented by
offset bytes and which is stored in place.
CFFI> (defparameter *two-words* (foreign-string-alloc "Common Lisp")) => *TWO-WORDS* CFFI> (defparameter *one-word* *two-words*) => *ONE-WORD* CFFI> (incf-pointer *one-word* 7) => #.(SB-SYS:INT-SAP #X00600457) CFFI> (foreign-string-to-lisp *one-word*) => "Lisp" CFFI> (foreign-string-to-lisp *two-words*) => "Common Lisp"
inc-pointer
make-pointer
pointerp
null-pointer
null-pointer-p