Function
fli
foreign-array-pointer array &rest subscripts => pointer
An FLI array or a pointer to an FLI array.
A list of valid array indices for array.
A pointer to the element at position subscripts in array.
foreign-array-pointer returns a pointer to a specified element in an array. The value pointed to can then be obtained by dereferencing the pointer returned, or set to a specific value by usingdereference andsetf. 2 0 is returned usingforeign-array-pointer.
(setq array1 (fli:allocate-foreign-object
:type '(:c-array :int 3 2)))
(setq array-ptr (fli:foreign-array-pointer array1 2 0))
dereference function can now be used withsetf to set the value pointed to byarray-ptr. (setf (fli:dereference array-ptr) 42)