summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul A. Patience <paul@apatience.com>2021-08-29 08:52:28 -0400
committerKaz Kylheku <kaz@kylheku.com>2021-08-29 09:32:01 -0700
commit85ad1ac0f65f493aa3adcbc1c3a97c1cdfa2a377 (patch)
tree11f6cdcebeef00336a7b116844920591ca54eae6
parent57b99d9da3dc5db0ff740de0c17e42529faa66a0 (diff)
downloadtxr-85ad1ac0f65f493aa3adcbc1c3a97c1cdfa2a377.tar.gz
txr-85ad1ac0f65f493aa3adcbc1c3a97c1cdfa2a377.tar.bz2
txr-85ad1ac0f65f493aa3adcbc1c3a97c1cdfa2a377.zip
buf, carray: remove de trop binding in accessors.
They were forgotten in commit 3ff876af6512ffc430900d0f46cda4f715d93e17. * stdlib/ffi.tl (carray-sub, sub-buf): Remove binding which ensures the new value is evaluated only once (defset does this already).
-rw-r--r--stdlib/ffi.tl8
1 files changed, 2 insertions, 6 deletions
diff --git a/stdlib/ffi.tl b/stdlib/ffi.tl
index bf1c6111..b9a86b7b 100644
--- a/stdlib/ffi.tl
+++ b/stdlib/ffi.tl
@@ -165,14 +165,10 @@
(define-accessor carray-ref carray-refset)
(defset carray-sub (carray : (from 0) (to t)) items
- (with-gensyms (it)
- ^(alet ((,it ,items))
- (progn (carray-replace ,carray ,it ,from ,to) ,it))))
+ ^(progn (carray-replace ,carray ,items ,from ,to) ,items))
(defset sub-buf (buf : (from 0) (to t)) items
- (with-gensyms (it)
- ^(alet ((,it ,items))
- (progn (replace-buf ,buf ,it ,from ,to) ,it))))
+ ^(progn (replace-buf ,buf ,items ,from ,to) ,items))
(defmacro znew (type . pairs)
(if (oddp (length pairs))