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. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/ _______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel