Re: deref-array types

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Mon, 7 Feb 2005 08:53:52 -0700
Newsgroups gmane.lisp.uffi.devel
Message-ID <[email protected]>
Cyrus Harmon wrote:
> The UFFI manual says that deref-array takes a type argument and that 
> this is the "foreign type of the array". The example given uses the 
> def-array-pointer function to generate the type that is used. I was 
> trying to make this work in OpenMCL and, while I could have sworn this 
> stuff was working before, in order to get it working again I had to 
> change my deref-array calls to not the array type, but the type of the 
> elements contained in the array, e.g.:
> 
> (uffi:deref-array ,lengths :int ,isym)
> 
> instead of
> 
> (uffi:deref-array ,lengths (* :int) ,isym)

(uffi:deref-array ptr '(* :int) pos)

is correct.

Look at the examples in the test suite:

$ grep deref-array tests/*.lisp

-- 
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]