diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 07:24:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 07:24:00 -0700 |
commit | 4f32b4b14f5986447dc3b732b101916412c91d22 (patch) | |
tree | afaf9b0bb4f233e5839b9e8f5f3442bd56b7e6b0 /share | |
parent | e7fe177abc6fd9414381b12d3c5ca47b21fb3806 (diff) | |
download | txr-4f32b4b14f5986447dc3b732b101916412c91d22.tar.gz txr-4f32b4b14f5986447dc3b732b101916412c91d22.tar.bz2 txr-4f32b4b14f5986447dc3b732b101916412c91d22.zip |
buffers: sub-buf becomes accessor.
* lisplib.c (ffi_set_entries): Register autoload for sub-buf
symbol.
* share/txr/stdlib/ffi.tl (sub-buf): Syntactic place
defined via defset.
* txr.1: Updated sub-buf documentation.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/ffi.tl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/share/txr/stdlib/ffi.tl b/share/txr/stdlib/ffi.tl index 6bbd43a9..0bf111c0 100644 --- a/share/txr/stdlib/ffi.tl +++ b/share/txr/stdlib/ffi.tl @@ -148,6 +148,9 @@ (defset carray-sub (carray : (from 0) (to t)) items ^(progn (carray-replace ,carray ,items ,from ,to) ,items)) +(defset sub-buf (buf : (from 0) (to t)) items + ^(progn (replace-buf ,buf ,items ,from ,to) ,items)) + (defmacro znew (type . pairs) (if (oddp (length pairs)) (throwf 'eval-error "~s: slot initform arguments must occur pairwise" |