diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-20 22:40:53 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-20 22:40:53 -0700 |
commit | 8f9697ed8f42681ab0df16ab38859d61ea05412e (patch) | |
tree | 10a7a50b5e7a0d26d11ddb5e3cf238f874e187ac /signal.c | |
parent | 378318ef010dfb15045dfadf242231793d1434de (diff) | |
download | txr-8f9697ed8f42681ab0df16ab38859d61ea05412e.tar.gz txr-8f9697ed8f42681ab0df16ab38859d61ea05412e.tar.bz2 txr-8f9697ed8f42681ab0df16ab38859d61ea05412e.zip |
ffi: testing and fixing flexible arrays.
* ffi.c (ffi_flex_struct_in): Check for the last member being
an array, and not null-terminated. We now check the character
conversion disposition of the array. If it has character
conversion, then we store the length right into the slot that
will become the string. In the no-conversion case, we assume
that if the member exists, it's a vector we can resize.
Otherwise we plant a vector of the required size.
(ffi_varray_put): Only call ffi_varray_dynsize if the Lisp
object is a vector. If the Lisp objecct is a number, then use
that as the size. Otherwise the size is zero.
* tests/017/flexstruct.tl: New file.
Diffstat (limited to 'signal.c')
0 files changed, 0 insertions, 0 deletions