diff options
-rw-r--r-- | share/txr/stdlib/ffi.tl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/txr/stdlib/ffi.tl b/share/txr/stdlib/ffi.tl index 0bf111c0..cf5bd8a1 100644 --- a/share/txr/stdlib/ffi.tl +++ b/share/txr/stdlib/ffi.tl @@ -146,10 +146,14 @@ (define-accessor carray-ref carray-refset) (defset carray-sub (carray : (from 0) (to t)) items - ^(progn (carray-replace ,carray ,items ,from ,to) ,items)) + (with-gensyms (it) + ^(alet ((,it ,items)) + (progn (carray-replace ,carray ,it ,from ,to) ,it)))) (defset sub-buf (buf : (from 0) (to t)) items - ^(progn (replace-buf ,buf ,items ,from ,to) ,items)) + (with-gensyms (it) + ^(alet ((,it ,items)) + (progn (replace-buf ,buf ,it ,from ,to) ,it)))) (defmacro znew (type . pairs) (if (oddp (length pairs)) |