This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Arrays and unions
- From: Eli Barzilay <eli at barzilay dot org>
- To: libffi-discuss at sourceware dot org
- Date: Sat, 20 Aug 2011 14:40:09 -0400
- Subject: Arrays and unions
An issue that we had open for a long time is a lack of support for
arrays and unions. We've finally implemented them, both in a similar
way:
libffi_type = malloc(sizeof(ffi_type));
libffi_type->size = sz;
libffi_type->alignment = align;
libffi_type->type = FFI_TYPE_STRUCT;
libffi_type->elements = elements;
The question is -- is FFI_TYPE_STRUCT the right choice here?
(The full code is at
https://github.com/plt/racket/blob/master/src/foreign/foreign.c#L1172)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!