[racket] Fun with the FFI

From: Michael Wilber (mwilber at uccs.edu)
Date: Wed Jan 9 17:38:48 EST 2013

Try this (untested):

(_fun [a : _double]
      [b : _double]
      [c : (_ptr o _double)]
      [d : (_ptr o _double)]
      -> [result : _int]
      -> (list c d result))

You can change (list c d result) to return any value that refers to the
a, b, c, and d bindings you just made.

Pierpaolo Bernardi <olopierpa at gmail.com> writes:
> 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.
>
> Thanks!
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.