summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-02 05:54:50 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-02 05:54:50 +0000
commita9f46aed69f9a9f8390bf4eea47cb4d6043ecb11 (patch)
tree86608681013a7566167676ce261bb64da3651063 /libiberty
parent2bba63d69171150ff7373cb17745e2ab05c22236 (diff)
downloadgcc-a9f46aed69f9a9f8390bf4eea47cb4d6043ecb11.tar.gz
* splay-tree.h (splay_tree_insert): Return the new node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/splay-tree.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index ac75bc7431a..4ad72e5d1ca 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+1999-08-01 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.c (splay_tree_insert): Return the new node.
+
1999-07-14 Richard Henderson <rth@cygnus.com>
* argv.c: Include stdlib.h and string.h instead of
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index 1cb6bd91f22..a17d0a1176a 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