+cl-uffi (1.4.21-1) unstable; urgency=low
+
+ * Fix for WITH-FOREIGN-OBJECT macro on CMUCL
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Thu, 10 Jun 2004 00:17:31 -0600
+
cl-uffi (1.4.20-1) unstable; urgency=low
* New upstream
"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)
+ #+sbcl `(sb-alien:deref ,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
(progn ,@body)
(free-foreign-object ,var)))
#+(or cmu scl)
- (let ((obj (gensym)))
- `(alien:with-alien ((,obj ,(convert-from-uffi-type (eval type) :allocate)))
- (let ((,var (alien:addr ,obj)))
- ,@body)))
+ (let ((obj (gensym))
+ (ctype (convert-from-uffi-type (eval type) :allocate)))
+ (if (and (consp ctype) (eq 'array (car ctype)))
+ `(alien:with-alien ((,obj ,ctype))
+ (let* ((,var ,obj))
+ ,@body))
+ `(alien:with-alien ((,obj ,ctype))
+ (let* ((,var (alien:addr ,obj)))
+ ,@body))))
#+sbcl
(let ((obj (gensym))
(ctype (convert-from-uffi-type (eval type) :allocate)))