[cffi-devel] More patches for ECL

James Bielman jamesjb at haytonsystems.com
Mon Oct 16 16:34:22 UTC 2006


On Mon, 2006-10-16 at 00:22 +0200, Juan Jose Garcia-Ripoll wrote:
> 2006/10/15, Yaroslav Kavenchuk <kavenchuk at tut.by>:
> > Why in %mem-ref/%mem-set  is used
> >   (+ offset type-size)
> > instead of
> >   (* offset type-size)?
> 
> I don't know. It looks like a bug, but this is a part of cffi-ecl.lsp
> which I still have not revised: I only changed convert-foreign-type to
> cffi-type->ecl.type

I don't understand exactly what SI:FOREIGN-DATA-RECAST is for here, but
the OFFSET argument to %MEM-REF is a raw byte offset, not an element
count, so adding it to the base pointer instead of multiplying it by the
size seems like a reasonable thing to do here.

Luís, it looks like this was added in the patch "Updated ECL Support"
about a year ago---do you remember why?

James




More information about the cffi-devel mailing list