diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-10 07:40:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-10 07:40:13 -0700 |
commit | d29381d5d2d9af69e954cfd9d3fd8d533003a7e2 (patch) | |
tree | c2c8b9a00e27651d05b4f87e5b96d20bdfbb21d9 /tree.h | |
parent | 326d267efb40ae2f8c750fede3343f68e732e1d3 (diff) | |
download | txr-d29381d5d2d9af69e954cfd9d3fd8d533003a7e2.tar.gz txr-d29381d5d2d9af69e954cfd9d3fd8d533003a7e2.tar.bz2 txr-d29381d5d2d9af69e954cfd9d3fd8d533003a7e2.zip |
tree: copy-tree-iter function.
* lib.c (copy): Handle tree_iter_s via copy_tree_iter.
* tree.c (copy_tree_iter): New function.
(tree_init): copy-tree-iter intrinsic registered.
* tree.h (copy_tree_iter): Declared.
* tests/010/tree.tl: New test case.
* txr.1: Documented.
* share/txr/stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'tree.h')
-rw-r--r-- | tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -25,7 +25,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -extern val tree_s, tree_fun_whitelist_s; +extern val tree_s, tree_iter_s, tree_fun_whitelist_s; #define tree_fun_whitelist (deref(lookup_var_l(nil, tree_fun_whitelist_s))) @@ -50,6 +50,7 @@ val tree_delete_node(val tree, val key); val tree_delete(val tree, val key); val tree_begin(val tree); val tree_begin_at(val tree, val lowkey); +val copy_tree_iter(val iter); val tree_reset(val iter, val tree); val tree_reset_at(val iter, val tree, val lowkey); val tree_next(val iter); |