summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-01-15 07:30:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-01-15 07:30:53 -0800
commit4375946224455b2509d6ca27e48c2cd6d51a704e (patch)
tree075337981a301105ef8ce4f0ee01aa19e12030e9 /txr.1
parent8ea9cc713f52fd0a1357aa5cded97ceb234b669a (diff)
downloadtxr-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.14
1 files changed, 4 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index f62cc5cf..b8f6f4a0 100644
--- a/txr.1
+++ b/txr.1
@@ -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.