Luís Oliveira a écrit :
Hello,

On Wed, Jun 25, 2008 at 4:09 PM, Antoine Allombert
<[EMAIL PROTECTED]> wrote:
(cffi:with-foreign-pointer (ptr 2)
         (setf (cffi:mem-ref ptr :int 0) 0)
         (setf (cffi:mem-ref ptr :int 1) 1)
         (let ((i 0))
         (loop for i from 0 below 2
         collect (cffi:mem-ref ptr :int i))))

You've allocated 2 bytes and then referenced 2 ints (8 bytes
probably). Try (with-foreign-object (ptr :int 2) ...).

HTH.

It gives the same result.

I evaluated my form on other machines with good result but I was
unable to find the difference between the systems (same LW, same cffi).
That's why I am asking about the use by cffi of local libraries or files.
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to