summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-05-09 18:14:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-05-09 18:14:20 -0700
commit5cb27535f5f0cdbcc0eca8976cac47bd178ae230 (patch)
tree5aa0bda46f47f389b02ce8f813154af29472c4a4 /tree.c
parent96715da165569922e1efa584eb0ce4f4d272c46d (diff)
downloadtxr-5cb27535f5f0cdbcc0eca8976cac47bd178ae230.tar.gz
txr-5cb27535f5f0cdbcc0eca8976cac47bd178ae230.tar.bz2
txr-5cb27535f5f0cdbcc0eca8976cac47bd178ae230.zip
tree: expose insert, lookup and delete functions.
* tree.c (tree_insert, tree_lookup_node, tree_delete_node, tree_delete): Switch internal linkage to external linkage. * tree.h (tree_insert, tree_lookup_node, tree_delete_node, tree_delete): Declared.
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tree.c b/tree.c
index 2a5334a2..1f9bd9ff 100644
--- a/tree.c
+++ b/tree.c
@@ -519,32 +519,32 @@ val tree_insert_node(val tree, val node)
return node;
}
-static val tree_insert(val tree, val key)
+val tree_insert(val tree, val key)
{
return tree_insert_node(tree, tnode(key, nil, nil));
}
-static val tree_lookup_node(val tree, val key)
+val tree_lookup_node(val tree, val key)
{
val self = lit("tree-lookup-node");
struct tree *tr = coerce(struct tree *, cobj_handle(self, tree, tree_s));
return tr_lookup(tr, key);
}
-static val tree_lookup(val tree, val key)
+val tree_lookup(val tree, val key)
{
val node = tree_lookup_node(tree, key);
return if2(node, node->tn.key);
}
-static val tree_delete_node(val tree, val key)
+val tree_delete_node(val tree, val key)
{
val self = lit("tree-delete-node");
struct tree *tr = coerce(struct tree *, cobj_handle(self, tree, tree_s));
return tr_delete(tree, tr, key);
}
-static val tree_delete(val tree, val key)
+val tree_delete(val tree, val key)
{
val node = tree_delete_node(tree, key);
return if2(node, node->tn.key);