A foreign type which passes the address of a Lisp simple vector direct to C.
keyword
:lisp-simple-1d-array &optional type
type⇩ |
A list. The default is nil . |
The FLI type :lisp-simple-1d-array
accepts a Lisp simple vector and passes a pointer to the first element of that vector.
The Lisp vector must be simple. That is, it does not have a fill pointer, is not adjustable, and it is not a displaced array.
It is vital that the garbage collector does not move the Lisp vector, hence :lisp-simple-1d-array
checks that the vector is statically allocated or allocated pinnable, in which case it is pinned implicitly as if by with-pinned-objects.
The argument type, if non-nil, is a list (element-type &rest dimensions)
and is used to check the element type and dimensions of the Lisp array passed.
Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:59