deref-array types
Cyrus Harmon <ch-uffi-dl6SmSK5uza1Z/[email protected]> Sun, 6 Feb 2005 21:20:21 -0800
| Newsgroups | gmane.lisp.uffi.devel |
|---|---|
| Message-ID | <[email protected]> |
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) Looking at the code I see that the type is ignored for cmu, sbcl, etc... and that it is used by OpenMCL and Allegro. I'm fine using the :int, e.g., but the docs should probably be updated to reflect this. Alternatively, the OpenMCL code "deref" the type, or perhaps I'm just doing something wrong again... Thanks, Cyrus