The type of the elements of the array.
A sequence of the dimensions of the new array.
type converts between FLI arrays and the C array type. In C, pointers are used to access the elements of an array. The implementation of the
type takes this into account, by automatically dereferencing any pointers returned when accessing an array using foreign-aref, unlike :foreign-array.
When using the
type in the specification of an argument to define-foreign-function, a pointer to the array is passed to the foreign function, as specified by the C language. You are allowed to call the foreign function with a FLI pointer pointing to an object of type
instead of a FLI array.
uses the C convention that the first index value of an array is
type when the corresponding C code uses an array with a constant declared size. If you need a dynamically sized array, then use a pointer type, allocate the array using the
argument to allocate-foreign-object or with-dynamic-foreign-objects and use dereference to access the elements. The pointer type is more efficient than making
types dynamically with different dimensions because the FLI caches information about every different FLI type descriptor that is used.
LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011