aboutsummaryrefslogtreecommitdiff
path: root/libiberty/splay-tree.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-08-02 05:54:50 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-08-02 05:54:50 +0000
commitd080bbfa45ca390f4beec7985f963fd2dbb10327 (patch)
tree86608681013a7566167676ce261bb64da3651063 /libiberty/splay-tree.c
parenteec9ef57bf59ea4e488f663e8007d11e6c599f21 (diff)
downloadgcc-d080bbfa45ca390f4beec7985f963fd2dbb10327.zip
gcc-d080bbfa45ca390f4beec7985f963fd2dbb10327.tar.gz
gcc-d080bbfa45ca390f4beec7985f963fd2dbb10327.tar.bz2
* splay-tree.h (splay_tree_insert): Return the new node.
From-SVN: r28389
Diffstat (limited to 'libiberty/splay-tree.c')
-rw-r--r--libiberty/splay-tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index 1cb6bd9..a17d0a1 100644
--- a/libiberty/splay-tree.c
+++ b/libiberty/splay-tree.c
@@ -256,9 +256,9 @@ splay_tree_delete (sp)
/* Insert a new node (associating KEY with DATA) into SP. If a
previous node with the indicated KEY exists, its data is replaced
- with the new value. */
+ with the new value. Returns the new node. */
-void
+splay_tree_node
splay_tree_insert (sp, key, value)
splay_tree sp;
splay_tree_key key;
@@ -305,6 +305,8 @@ splay_tree_insert (sp, key, value)
sp->root = node;
}
+
+ return sp->root;
}
/* Lookup KEY in SP, returning VALUE if present, and NULL