[cffi-devel] Accessing integer arrays Lisp->C

Luís Oliveira luismbo at gmail.com
Wed Nov 23 23:53:38 UTC 2011


Hello,

On Mon, Nov 21, 2011 at 9:01 PM, Stephan Frank <sfrank at cs.tu-berlin.de> wrote:
>    (with-foreign-object (idx :int len)
>      (map nil (lambda (x)
>                 (setf (mem-ref idx :int i) x)

MEM-REF's offset argument is byte-sized. You want MEM-AREF here.

>                 (incf i))
>           l)
>      (try-it idx len))))


BTW, cffi-devel requires subscription, I happened to notice your mail
in the moderation queue, but usually there's too much spam and I just
delete everything. Please subscribe. :-)

Cheers,

-- 
Luís Oliveira
http://r42.eu/~luis/




More information about the cffi-devel mailing list