diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-08-21 17:32:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-08-21 17:32:13 -0700 |
commit | 0dd1d1a586fcfcf11e0b1c926c8be9c4c8d525be (patch) | |
tree | 1e674edaf8401bc52745c930edfe3c114e1073a7 /txr.1 | |
parent | bc06c87a10f9d9ddc4209ec0a49ab48bf37dc706 (diff) | |
download | txr-0dd1d1a586fcfcf11e0b1c926c8be9c4c8d525be.tar.gz txr-0dd1d1a586fcfcf11e0b1c926c8be9c4c8d525be.tar.bz2 txr-0dd1d1a586fcfcf11e0b1c926c8be9c4c8d525be.zip |
New function: cptr-buf.
* eval.c (eval_init): Register cptr-buf intrinsic.
* lib.c (cptr_buf): New function.
* lib.h (cptr_buf): Declared.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 39 |
1 files changed, 37 insertions, 2 deletions
@@ -49650,13 +49650,13 @@ This symbol becomes the object's type tag. The lifetime of the returned -.cptr +.code cptr object is independent from that of .metn object . If the lifetime of .meta object reaches its end before that of the -.code cptr , +.codn cptr , the pointer stored inside the .code cptr becomes invalid. @@ -49683,6 +49683,41 @@ type, then the expression reproduces .metn n . +.coNP Function @ cptr-buf +.synb +.mets (cptr-obj < buf <> [ type-symbol ]) +.syne +.desc +The +.code cptr-buf +returns a +.code cptr +object which holds a pointer to a buffer object's storage +area. The +.meta buf +argument must be of type +.codn buf . + +The +.meta type-symbol +argument should be a symbol. If omitted, it defaults to +.codn nil . +This symbol becomes the +.code cptr +object's type tag. + +The lifetime of the returned +.code cptr +object is independent from that of +.metn buf . +If the lifetime of +.meta buf +reaches its end before that of the +.codn cptr , +the pointer stored inside the +.code cptr +becomes invalid. + .coNP Function @ cptr-cast .synb .mets (cptr-cast < type-symbol << cptr ) |