Commit d080bbfa by Mark Mitchell Committed by Mark Mitchell

* splay-tree.h (splay_tree_insert): Return the new node.

From-SVN: r28389
parent eec9ef57
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> 1999-07-11 Ian Lance Taylor <ian@zembu.com>
* ansidecl.h: Copy attribute support macros from egcs. * ansidecl.h: Copy attribute support macros from egcs.
......
...@@ -95,7 +95,8 @@ extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn, ...@@ -95,7 +95,8 @@ extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
splay_tree_delete_key_fn, splay_tree_delete_key_fn,
splay_tree_delete_value_fn)); splay_tree_delete_value_fn));
extern void splay_tree_delete PARAMS((splay_tree)); 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_key,
splay_tree_value)); splay_tree_value));
extern splay_tree_node splay_tree_lookup extern splay_tree_node splay_tree_lookup
......
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> 1999-07-14 Richard Henderson <rth@cygnus.com>
* argv.c: Include stdlib.h and string.h instead of * argv.c: Include stdlib.h and string.h instead of
......
...@@ -256,9 +256,9 @@ splay_tree_delete (sp) ...@@ -256,9 +256,9 @@ splay_tree_delete (sp)
/* Insert a new node (associating KEY with DATA) into SP. If a /* Insert a new node (associating KEY with DATA) into SP. If a
previous node with the indicated KEY exists, its data is replaced 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_insert (sp, key, value)
splay_tree sp; splay_tree sp;
splay_tree_key key; splay_tree_key key;
...@@ -305,6 +305,8 @@ splay_tree_insert (sp, key, value) ...@@ -305,6 +305,8 @@ splay_tree_insert (sp, key, value)
sp->root = node; sp->root = node;
} }
return sp->root;
} }
/* Lookup KEY in SP, returning VALUE if present, and NULL /* Lookup KEY in SP, returning VALUE if present, and NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment