[cffi-devel] passing value of different type than :int to foreign function

Liam Healy lnp at healy.washington.dc.us
Wed Jun 30 21:25:35 UTC 2010


(foo 45.0d0)

This has nothing to do with "non-:int" or even foreign functions,
it has to with how you create a double float in lisp.

Liam

On Wed, Jun 30, 2010 at 5:16 PM, N J <raphexion at gmail.com> wrote:
> Hi,
>
> I have a question about passing values to foreign functions that are not :int.
>
> If I define a foreign function as
> (cffi:defcfun "foo"
>   :void
>  (val :double))
>
> I am not able to call it with
> (foo 45.0)
>
> Because 45.0 is not of type :double. I have tried different ways
> (convert-to-foreign and so on) but I cannot solve it.
>
> Any help is greatly appriciated.
> // Nik
>
> _______________________________________________
> cffi-devel mailing list
> cffi-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
>




More information about the cffi-devel mailing list