summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisplib.c2
-rw-r--r--share/txr/stdlib/ffi.tl2
-rw-r--r--txr.19
3 files changed, 11 insertions, 2 deletions
diff --git a/lisplib.c b/lisplib.c
index 39159edd..acc7b6b6 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -524,7 +524,7 @@ static val ffi_set_entries(val dlt, val fun)
{
val name[] = {
lit("with-dyn-lib"), lit("deffi"), lit("deffi-type"), lit("deffi-cb"),
- lit("typedef"), lit("sizeof"), lit("ffi"),
+ lit("typedef"), lit("sizeof"), lit("ffi"), lit("carray-ref"),
nil
};
set_dlt_entries(dlt, name, fun);
diff --git a/share/txr/stdlib/ffi.tl b/share/txr/stdlib/ffi.tl
index 902605fa..12f9dab6 100644
--- a/share/txr/stdlib/ffi.tl
+++ b/share/txr/stdlib/ffi.tl
@@ -101,3 +101,5 @@
(defmacro ffi (type)
^(ffi-type-compile ',type))
+
+(define-accessor carray-ref carray-refset)
diff --git a/txr.1 b/txr.1
index c5fcee5c..5b3614c9 100644
--- a/txr.1
+++ b/txr.1
@@ -55107,9 +55107,10 @@ operation).
This creates a potentially unsafe situation in which the length requires
a larger amount of backing storage than is provided by the buffer.
-.coNP Function @ carray-ref
+.coNP Accessor @ carray-ref
.synb
.mets (carray-ref < carray << idx )
+.mets (set (carray-ref < carray << idx ) << new-val )
.syne
.desc
The
@@ -55149,6 +55150,12 @@ Then, the get semantics of the element type is invoked to convert, to
a Lisp object, a region of data starting at calculated byte offset in the array
storage. The resulting object is returned.
+Assigning an a value to a
+.code caddr-ref
+form is equivalent to using
+.code caddr-refset
+to store the value.
+
.coNP Function @ carray-refset
.synb
.mets (carray-refset < carray < idx << new-val )