All Manuals > Foreign Language Interface User Guide and Reference Manual > 8 Type Reference

:lisp-simple-1d-array FLI Type Descriptor

Summary

A foreign type which passes the address of a Lisp simple vector direct to C.

Package

keyword

Syntax

:lisp-simple-1d-array &optional type

Arguments
type
A list. The default is nil.
Description

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.

See also

:lisp-array
with-dynamic-lisp-array-pointer


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:59