diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-07-15 10:22:53 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-07-15 10:22:53 -0700 |
commit | d151853a6be4548c8a4d02b839b7dce689217a7d (patch) | |
tree | 8fe2b02c2c3ecdc1a4df502b7884f1b22d16a205 /ffi.h | |
parent | b15f6304249de5ba503bedc9944cb57aa1771cd8 (diff) | |
download | txr-d151853a6be4548c8a4d02b839b7dce689217a7d.tar.gz txr-d151853a6be4548c8a4d02b839b7dce689217a7d.tar.bz2 txr-d151853a6be4548c8a4d02b839b7dce689217a7d.zip |
carray: add offset to carray-buf.
* ffi.c (struct carray): New member, offs.
(make_carray): Initiialize offs member from new argument.
(copy_carray, carray_blank, carry_ptr, carray_sub,
carray_pun, carray_unum, carray_num): Pass zero offset to
(carray_buf): New optional parameter off_in.
(carray_buf_sync): Handle offset.
(ffi_init): Update registration of carray-buf.
* ffi.h (make_carray, carray_buf): Declaration updated.
* txr.1: Documented.
Diffstat (limited to 'ffi.h')
-rw-r--r-- | ffi.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,7 +90,7 @@ val ffi_put(val obj, val type); val ffi_in(val srcbuf, val obj, val type, val copy_p); val ffi_get(val srcbuf, val type); val ffi_out(val dstbuf, val obj, val type, val copy_p); -val make_carray(val type, mem_t *data, cnum nelem, val ref); +val make_carray(val type, mem_t *data, cnum nelem, val ref, cnum offs); val carrayp(val obj); val carray_set_length(val carray, val nelem); val carray_dup(val carray); @@ -103,7 +103,7 @@ mem_t *carray_ptr(val carray, val type, val self); val carray_vec(val vec, val type, val null_term_p); val carray_list(val list, val type, val null_term_p); val carray_blank(val nelem, val type); -val carray_buf(val buf, val type); +val carray_buf(val buf, val type, val offs); val carray_buf_sync(val carray); val carray_cptr(val cptr, val type, val len); val vec_carray(val carray, val null_term_p); |