[racket] Fun with the FFI

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Jan 9 17:29:41 EST 2013

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


Posted on the users mailing list.