diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-15 07:30:53 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-15 07:30:53 -0800 |
commit | 4375946224455b2509d6ca27e48c2cd6d51a704e (patch) | |
tree | 075337981a301105ef8ce4f0ee01aa19e12030e9 /txr.1 | |
parent | 8ea9cc713f52fd0a1357aa5cded97ceb234b669a (diff) | |
download | txr-4375946224455b2509d6ca27e48c2cd6d51a704e.tar.gz txr-4375946224455b2509d6ca27e48c2cd6d51a704e.tar.bz2 txr-4375946224455b2509d6ca27e48c2cd6d51a704e.zip |
ffi: arrays: be more forgiving of length mismatches.
* ffi.c (min): New macro.
(ffi_array_put_common): Tolerate sequences which are shorter
than the array. Use seq_info to classify the sequence and use
separate code for the vector and list case, avoiding taking
the length of the list.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -59140,6 +59140,10 @@ simply iterates over the Lisp sequence, and performs an element for element conversion to .metn type . +If the sequence is shorter than the array, then the remaining elements +are filled with zero bits. If the sequence is longer than the array, then the +excess elements in the sequence are ignored. + Since Lisp arrays and C arrays do not share the same representation, temporary buffers are automatically created and destroyed by FFI to manage the conversion. |