Next: foreign-string-free, Up: Strings
(unsigned-byte 8)
.
The foreign-string-alloc
function allocates a foreign string
containing a Lisp string or (unsigned-byte 8)
array.
This string must be freed with foreign-string-free
.
CFFI> (setq str (foreign-string-alloc "Hello, foreign world!")) => #<FOREIGN-ADDRESS #x00400560> CFFI> (foreign-funcall "strlen" :pointer str :int) => 21