summaryrefslogtreecommitdiffstats
path: root/tree.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-05-10 07:40:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-05-10 07:40:13 -0700
commitd29381d5d2d9af69e954cfd9d3fd8d533003a7e2 (patch)
treec2c8b9a00e27651d05b4f87e5b96d20bdfbb21d9 /tree.h
parent326d267efb40ae2f8c750fede3343f68e732e1d3 (diff)
downloadtxr-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tree.h b/tree.h
index 690cd91b..72ee43db 100644
--- a/tree.h
+++ b/tree.h
@@ -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);