diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 06:54:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 14:25:35 -0700 |
commit | 5ef6b01420fe68f40c266cec62c5b4a7931420f1 (patch) | |
tree | 9dbb4703e9ad96e11d268538f7956128654ff194 /txr.1 | |
parent | a9739d76c8275f6c867b86d8e218571e3a584ad9 (diff) | |
download | txr-5ef6b01420fe68f40c266cec62c5b4a7931420f1.tar.gz txr-5ef6b01420fe68f40c266cec62c5b4a7931420f1.tar.bz2 txr-5ef6b01420fe68f40c266cec62c5b4a7931420f1.zip |
carray-sub: improved accessor.
* share/txr/stdlib/ffi.tl (carray-sub): We use defset to
define a carray-sub place that updates via carray-replace,
rather than using a place macro to defer to the
generic sub accessor. This results in a more efficient
implementation. This new accessor doesn't require the carray
argument to be a place; unlike sub, it doesn't have to capture
the return value of carray-replace and store it back into
the carray variable.
* txr.1: Updated doc.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -65108,9 +65108,18 @@ and modifications in the original are not reflected in the subrange. If .code carray-sub -is used as a syntactic place, behaves exactly like the -.code sub -accessor, via a place macro substitution to that form. +is used as a syntactic place, the argument expressions +.metn carray , +.metn from , +.meta to +and +.meta new-val +are evaluated just once. The prior value, if required, is accessed by calling +.code carray-sub +and +.meta new-val +is then stored via +.codn carray-replace . .coNP Function @ carray-replace .synb |