[cffi-devel] CFFI problem in Lispworks 5.1 32-bit with :long-long emulation
The problem manifests itself while trying to compile the latest CL-SQLite; but can be replicated with: (defcfun test :int64) Error: :LONG-LONG fell through ECASE expression. Wanted one of (:CHAR :UNSIGNED-CHAR :SHORT :UNSIGNED-SHORT :INT :UNSIGNED-INT :LONG :UNSIGNED-LONG :FLOAT :DOUBLE :POINTER :VOID). 1 (abort) Return to level 0. 2 Return to top loop level 0. The long-long gets through and fails in the lispworks-specific "Ecase" (that has them removed for non-64-bit lispworks). It looks as though something higher up is meant to filter/emulate this. There seems to be emulation code in types.lisp The :long-long comes from the method (defmethod canonicalize ((tp emulated-llong)) :long-long) But somehow this :long-long proliferates down all the way to the lispworks-specific code. By the way, and I don't know if this is relevant; but (fli:size-of '(:long :long :int)) returns 8 in this Lispworks - I mention it only as someone on #lisp asked me to try it. How should I proceed? Thanks, Matt
On Thu, Nov 19, 2009 at 5:33 PM, Matt Lamari <matt.lamari@gmail.com> wrote:
(defcfun test :int64) [...] The long-long gets through and fails in the lispworks-specific "Ecase" (that has them removed for non-64-bit lispworks).
Long-long emulation is not implemented for DEFCFUN, DEFCALLBACK, etc. It turns out that Lispworks does in fact support long-long on 32-bit platforms for DEFCFUN at least. Please let me know if the attached patch works for you. -- Luís Oliveira http://r42.eu/~luis/
participants (2)
-
Luís Oliveira
-
Matt Lamari