[racket] Fun with the FFI

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Wed Jan 9 18:36:08 EST 2013

It works.  Thanks!


2013/1/9, Ryan Culpepper <ryanc at ccs.neu.edu>:
> On 01/09/2013 05:16 PM, Pierpaolo Bernardi wrote:
>> Hello all,
>>
>> Can someone show me what's the correct FFI type for this C function:
>>
>> int foo(double a, double b, double *c, double *d)
>>
>> where c and d are output only parameters, and I want back *c, *d, and
>> the int return value.
>
> This should work:
>
> (_fun _double
>        _double
>        (c : (_ptr o _double))
>        (d : (_ptr o _double))
>        -> (result : _int)
>        -> (values c d result))
>
> Ryan
>
>

-- 
Inviato dal mio dispositivo mobile

Posted on the users mailing list.