diff options
-rw-r--r-- | lisplib.c | 2 | ||||
-rw-r--r-- | share/txr/stdlib/ffi.tl | 2 | ||||
-rw-r--r-- | txr.1 | 9 |
3 files changed, 11 insertions, 2 deletions
@@ -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) @@ -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 ) |