Re: UFFI evaluation of certain params at macro-expansion time

Kenny Tilton <[email protected]> Sat, 28 Dec 2002 22:44:42 -0500
Newsgroups gmane.lisp.uffi.devel
Message-ID <[email protected]>
Oops, never mind. :)

Kenny Tilton wrote:
> I tried to write this code:
> 
> (defun make-foreign-array (type &rest values)
>   (let ((fv (uffi:allocate-foreign-object `(:array ,type)
>                                        (length values))))
>     (dotimes (n (length values) fv)
>       (setf (uffi:deref-array fv `(:array ,type) n) (nth n values)))))
> 
> ...but got into trouble by UFFI evaluating parameters, fell back on ACL 
> FFI thus:
> 
> (defun make-foreign-array (type &rest values)
>   (let ((fv (ff:allocate-fobject `(:array ,type ,(length values)) :c)))
>     (dotimes (n (length values) fv)
>       (setf (ff:fslot-value-typed `(:array ,type) :c fv n)
>            (nth n values)))))
> 
> I don't know the issues very well so maybe there is a reason UFFI cannot 
> support the code I attempted, but I thought I'd mention it in case it 
> could.
> 
> 


-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Cells let us walk, talk, think, make love and realize
  the bath water is cold." -- Lorraine Lee Cudmore