A foreign pointer.
A non-negative integer. The default is
1
.
An integer. The default is
0
.
The function
fill-foreign-object
fills the pointer
pointer
with the value
byte
. If
nelems
is greater than 1, an array of objects starting at
pointer
is filled.
(fli:with-dynamic-foreign-objects ()
(let ((pp (fli:allocate-dynamic-foreign-object
:type :char
:initial-element 66
:nelems 6)))
(fli:fill-foreign-object pp :nelems 3 :byte 65)
(loop for i below 6 collect
(fli:dereference pp :type :char :index i))))
=>
(#\A #\A #\A #\B #\B #\B)
LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011