r9320: add THE declaration to DEREF array, fix convert-to-uffi-type to make unsized...
[uffi.git] / src / primitives.lisp
index c430894f711922ace55c007c5e25b1e660128575..26737bdce30205db01bcb2bee0eab4a6fa27ff67 100644 (file)
@@ -277,6 +277,15 @@ supports takes advantage of this optimization."
   (let ((result (%convert-from-uffi-type type context)))
     (cond
      ((atom result) result)
+     ;; Arrays without size are really pointers to type on SBCL/CMUCL
+     #+sbcl
+     ((and (consp type) (= 2 (length type)) (eq :array (car type)))
+      (setf (car result) 'sb-alien:*)
+      result)
+     #+cmu
+     ((and (consp type) (= 2 (length type)) (eq :array (car type)))
+      (setf (car result) 'alien:*)
+      result)
      #+openmcl
      ((eq (car result) :address)
       (if (eq context :struct)