[cffi-devel] cffi-uffi-compat vs :float

Luís Oliveira luismbo at gmail.com
Sat May 20 03:57:45 UTC 2006


On 2006-maj-19, at 23:43, Ken Tilton wrote:
> The allocate ended up with CFFI being passed ':float, which really  
> made CFFI unhappy.

Strange, it works for me.

UFFI> (allocate-foreign-object :float 16)
#<A Mac Pointer #x302E30>

Also, ':float shouldn't be a problem:

CFFI> (foreign-alloc ':float)
#<A Mac Pointer #x3019F0>


> But a similar hack on deref-array did not fly [...]

If I understand the UFFI docs correctly, I think your code is not  
correct UFFI, since deref-array expects an array type, not the type  
of the array's elements. So, def-array-pointer would be necessary to  
define the array type.

cffi-uffi-compat seems to be a great way to find bugs in UFFI code, heh.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/





More information about the cffi-devel mailing list