Hi,
Here is a trivial patch to enable 64 bits types on a recent CLISP version (newer than 2.38).
I tested the latest CVS version, on Linux 2.6 x86-32. All the tests pass.
However, I don't know how to test for the CLISP version to enable conditionally this support, because while at least CLISP 2.38 support ffi:uint64 and ffi:sint64 for function call parameters, it doesn't for return value of this type (it's accepted, but we get a random value.)
--- cffi_0.9.1.orig/src/cffi-clisp.lisp 2006-04-11 22:02:54.000000000 +0200 +++ cffi_0.9.1/src/cffi-clisp.lisp 2006-06-26 02:46:01.000000000 +0200 @@ -63,7 +63,6 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (mapc (lambda (feature) (pushnew feature *features*)) '(;; Backend mis-features. - cffi-features:no-long-long ;; OS/CPU features. #+macos cffi-features:darwin #+unix cffi-features:unix @@ -96,6 +95,8 @@ (:unsigned-int 'ffi:uint) (:long 'ffi:long) (:unsigned-long 'ffi:ulong) + (:long-long 'ffi:sint64) + (:unsigned-long-long 'ffi:uint64) (:float 'ffi:single-float) (:double 'ffi:double-float) ;; Clisp's FFI:C-POINTER converts NULL to NIL. For now
On 2006-jun-26, at 02:24, Frédéric Jolliton wrote:
Here is a trivial patch to enable 64 bits types on a recent CLISP version (newer than 2.38).
Applied, thanks.
- (:long-long 'ffi:sint64)
- (:unsigned-long-long 'ffi:uint64)
Out of curiosity, since CVS CLISP doesn't build on darwin/ppc at the moment, isn't there a ffi:llong, ffi:long-long or something?