[cffi-devel] small bag in cffi-uffi-compat

Luís Oliveira luismbo at gmail.com
Tue Dec 13 02:20:55 UTC 2005


On 2005-dec-12, at 13:06, Леонид Новиков wrote:
>> The type should be (:array g-value) not (:array (quote g-value))
>
> (:array 'g-value) was received as follows:
>
> (defmacro ff-elt (v type n)
>   `(uffi:deref-array ,v '(:array ,type) ,n))
>
> (setq gva (ffx:fgn-alloc 'g-value 1 :with-g-value))
>
> (ff-elt gva 'g-value 0)
>
> This part of code cells-gtk. I try to start current version under  
> clisp using cffi-uffi-compat. With my correction this was got.
> I expected that uffi and cffi-uffi-comapt under alike parameter  
> must return alike results :)

Hmm... to tell you the truth, I've investigated this issue and I  
don't quite understand how the :array type is supposed to behave:

CL-USER(2): (uffi:def-struct g-value (g-type (:array :int 16)))
#<FOREIGN-FUNCTIONS::FOREIGN-STRUCTURE G-VALUE>
CL-USER(3): (uffi::convert-from-uffi-type '(:array 'g-value) :type)
(:ARRAY G-VALUE)
CL-USER(4): (uffi::convert-from-uffi-type '(:array g-value) :type)
(:ARRAY G-VALUE)

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt




More information about the cffi-devel mailing list