When using latest CFFI via clbuild2 (git://<a href="http://common-lisp.net/projects/cffi/cffi.git">common-lisp.net/projects/cffi/cffi.git</a>), I encountered a problem with :int64 fields. CFFI seems to treat this field as (signed-byte 32). This is with SBCL x86-64 on Ubuntu 10.10:<div>
<div><br></div><div><div>This is SBCL 1.0.55.1-6548750, an implementation of ANSI Common Lisp.</div><div>More information about SBCL is available at <<a href="http://www.sbcl.org/">http://www.sbcl.org/</a>>.</div><div>
<br></div><div>SBCL is free software, provided as is, with absolutely no warranty.</div><div>It is mostly in the public domain; some portions are provided under</div><div>BSD-style licenses.  See the CREDITS and COPYING files in the</div>
<div>distribution for more information.</div><div>* (require :cffi)</div><div><br></div><div>NIL</div><div>* (cffi:defcstruct foo (a :int64)) </div><div><br></div><div>FOO</div><div>* (cffi:with-foreign-object (foo 'foo) </div>
<div>  (setf (cffi:foreign-slot-value foo 'foo 'a) 123456789012345))</div><div>; in: CFFI:WITH-FOREIGN-OBJECT (FOO 'FOO)</div><div>;     (SETF (CFFI:FOREIGN-SLOT-VALUE FOO 'FOO 'A) 123456789012345)</div>
<div>; --> LET* MULTIPLE-VALUE-BIND LET PROGN CFFI::FOREIGN-SLOT-SET SETF LET* </div><div>; --> MULTIPLE-VALUE-BIND LET PROGN CFFI::MEM-SET CFFI-SYS:%MEM-SET LET SETF </div><div>; ==></div><div>;   (SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14)</div>
<div>; </div><div>; caught WARNING:</div><div>;   Derived type of #:VALUE14 is</div><div>;     (VALUES (INTEGER 123456789012345 123456789012345) &OPTIONAL),</div><div>;   conflicting with its asserted type</div><div>;     (SIGNED-BYTE 32).</div>
<div>;   See also:</div><div>;     The SBCL Manual, Node "Handling of Types"</div><div>; </div><div>; compilation unit finished</div><div>;   caught 1 WARNING condition</div><div><br></div><div>debugger invoked on a SIMPLE-TYPE-ERROR in thread</div>
<div>#<THREAD "initial thread" RUNNING {10029B97C3}>:</div><div>  Value of #:VALUE14 in</div><div>    (SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14)</div><div>  is</div><div>    123456789012345,</div><div>
  not a</div><div>    (SIGNED-BYTE 32).</div><div><br></div><div>Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.</div><div><br></div><div>restarts (invokable by number or by possibly-abbreviated name):</div>
<div>  0: [ABORT] Exit debugger, returning to top level.</div><div><br></div><div>(SB-C::%COMPILE-TIME-TYPE-ERROR</div><div> (123456789012345)</div><div> (SIGNED-BYTE 32)</div><div> #<unavailable argument></div><div>
 ((SB-KERNEL:%SET-SIGNED-SAP-REF-32 FOO 0 #:VALUE14) . #:VALUE14))</div><div>0] 0</div></div><div><br></div><div><br></div><div><br></div><div><br></div></div>