[cffi-devel] About long-long support in AMD64 LispWorks

Chun Tian (binghe) binghe.lisp at gmail.com
Wed Jun 6 17:48:27 UTC 2007


Hi, CFFI Developers

I found that in AMD64 Linux, the long and long long type are both 8
bytes. Can I directly map CFFI's :long-long into LispWorks FLI's :long
type to get support for long-long type? (This is need when I compile
iolib package in amd64 LispWorks):

cffi-lispworks.lisp:

(defun convert-foreign-type (cffi-type)
  "Convert a CFFI type keyword to an FLI type."
  (ecase cffi-type
    (:char            :byte)
    (:unsigned-char   '(:unsigned :byte))
    (:short           :short)
    (:unsigned-short  '(:unsigned :short))
    (:int             :int)
    (:unsigned-int    '(:unsigned :int))
    (:long            :long)
    (:unsigned-long   '(:unsigned :long))
    #+amd64
    (:long-long       :long)
    #+amd64
    (:unsigned-long-long '(:unsigned :long))
    (:float           :float)
    (:double          :double)
    (:pointer         :pointer)
    (:void            :void)))

Thanks.

Chun Tian (binghe)




More information about the cffi-devel mailing list