[racket] math/matrix <--> FFI/array

From: Danny Yoo (dyoo at hashcollision.org)
Date: Wed Feb 13 12:14:45 EST 2013

On Wed, Feb 13, 2013 at 9:41 AM, Pierpaolo Bernardi <olopierpa at gmail.com> wrote:
> Another FFI question:
> I want to interface a C function which has the following signature:
> void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4])

Example written:


I cooked up a stub definition of iauA2tf that just writes into sign and ihmsf.


I modified the ffi signature so it uses _byte, rather than _int.  It
also uses _array/vector to make it nicer on client Racket code:


Other than that, this should work ok.  Can you confirm?

Posted on the users mailing list.