r9320: add THE declaration to DEREF array, fix convert-to-uffi-type to make unsized...
[uffi.git] / src / aggregates.lisp
index 523bd4f72983eadee80b0aa91ef86c6e3bae09ca..255e226ea70e86574daab2166954577499a1d6af 100644 (file)
@@ -159,9 +159,9 @@ of the enum-name name, separator-string, and field-name"
 
 (defmacro deref-array (obj type i)
   "Returns a field from a row"
-  #+(or lispworks cmu sbcl scl) (declare (ignore type))
-  #+(or cmu scl)  `(alien:deref ,obj ,i)
-  #+sbcl  `(sb-alien:deref ,obj ,i)
+  #+(or lispworks scl) (declare (ignore type))
+  #+(or cmu scl)  `(alien:deref (the (alien:alien ,(convert-from-uffi-type type :declare)) ,obj) ,i)
+  #+sbcl  `(sb-alien:deref (the (sb-alien:alien ,(convert-from-uffi-type type :declare)) ,obj) ,i)
   #+lispworks `(fli:dereference ,obj :index ,i :copy-foreign-object nil)
   #+allegro `(ff:fslot-value-typed (quote ,(convert-from-uffi-type type :type)) :c ,obj ,i)
   #+openmcl