[cffi-devel] strange behaviour of CFFI with LW on OS X

Stelian Ionescu sionescu at common-lisp.net
Wed Jun 25 15:23:58 UTC 2008


On Wed, 2008-06-25 at 16:14 +0100, Luís Oliveira wrote:
> Hello,
> 
> On Wed, Jun 25, 2008 at 4:09 PM, Antoine Allombert
> <antoine.allombert at labri.fr> 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))))

HU> (setf *print-base* 16)
10
HU> (cffi:with-foreign-object (ptr :int 2)
      (setf (cffi:mem-ref ptr :int 0) #x07)
      (setf (cffi:mem-ref ptr :int 1) #x15)
      (values (cffi:mem-ref ptr :int 0)
              (cffi:mem-ref ptr :int 1)))
1507
15

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20080625/c808a4d8/attachment.sig>


More information about the cffi-devel mailing list