]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* splay-tree.h (splay_tree_insert): Return the new node.
authorMark Mitchell <mark@codesourcery.com>
Mon, 2 Aug 1999 05:54:50 +0000 (05:54 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 2 Aug 1999 05:54:50 +0000 (05:54 +0000)
From-SVN: r28389

include/ChangeLog
include/splay-tree.h
libiberty/ChangeLog
libiberty/splay-tree.c

index 6ec3b0b963dee5657315a5aa30b1ec2847b30c87..5d213d52993cdd1844bf2e5a12e675fea5a059ec 100644 (file)
@@ -1,3 +1,7 @@
+1999-08-01  Mark Mitchell  <mark@codesourcery.com>
+
+       * splay-tree.h (splay_tree_insert): Return the new node.
+
 1999-07-11  Ian Lance Taylor  <ian@zembu.com>
 
        * ansidecl.h: Copy attribute support macros from egcs.
index e828fe7e9077112850aa2ede19a12f75cfe54b54..307cf054e128ba438b27dbbefd97803546b2c23e 100644 (file)
@@ -95,7 +95,8 @@ extern splay_tree splay_tree_new        PARAMS((splay_tree_compare_fn,
                                                splay_tree_delete_key_fn,
                                                splay_tree_delete_value_fn));
 extern void splay_tree_delete           PARAMS((splay_tree));
-extern void splay_tree_insert           PARAMS((splay_tree,
+extern splay_tree_node splay_tree_insert          
+                                       PARAMS((splay_tree,
                                                splay_tree_key,
                                                splay_tree_value));
 extern splay_tree_node splay_tree_lookup   
index ac75bc7431ab58324d90e1fcb58e250ddacd4a2f..4ad72e5d1cab5fc78d23fa14769fe073bb59cca3 100644 (file)
@@ -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 
index 1cb6bd91f2299dc146423094cd1525e91f7e8276..a17d0a1176a5f41ad1f47ca4ce0b38143da5d845 100644 (file)
@@ -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