summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-06 08:33:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-06 08:33:07 -0700
commit7880c9b565ab438e1bf0250a967acdbf8d04cb42 (patch)
treee62180dae2480480a1eb5715ecdbdc1b82525629 /struct.c
parent1e8a60d62a9eb8ef9b8db31b55bfa075fa8c9c7b (diff)
downloadtxr-7880c9b565ab438e1bf0250a967acdbf8d04cb42.tar.gz
txr-7880c9b565ab438e1bf0250a967acdbf8d04cb42.tar.bz2
txr-7880c9b565ab438e1bf0250a967acdbf8d04cb42.zip
ffi: varray feature
If an array dimension is void, it is a varray. The C representation is pointer. The size is inferred from the length of the object. Doesn't support get method. * ffi.c (struct txr_ffi_type): New bitfield flag, is_varray. (ffi_varray_alloc): New function. (ffi_array_in, ffi_array_put, ffi_array_out): Check is_varray flag and use dynamic array size from object. (ffi_type_compile): If the array dimension is the symbol void, create a varray: a mongrel created using make_ffi_type_pointer, but using the array functions, plus alloc and free handlers, and the is_varray flag being set.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions