[gambit-list] Returning homogeneous numeric vectors from C to Scheme

Guillaume Cartier gucartier at gmail.com
Sat Jul 18 06:47:30 EDT 2020


___SCMOBJ result = ___EXT(___alloc_scmobj) (NULL, ___sF64VECTOR,
count*sizeof(___F64));
double *ptr = ___CAST(double*,___BODY(result));

...

___EXT(___release_scmobj)(result);
return result;

On Sat, Jul 18, 2020 at 6:30 AM Lassi Kortela <lassi at lassi.io> wrote:

> How would one use the FFI to make a fresh s64vector with the same values
> as a C int64_t[] array? In gambit.h I can only find ___make_vector()
> which makes a generic vector.
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20200718/8d5f711b/attachment.htm>


More information about the Gambit-list mailing list