Next: rbtree_join, Previous: rbtree_insert, Up: Public Routines
Insert a detached node into a tree.
#include <rbtree/rbtree.h>int rbtree_insert_dnode( RBTree rbtree, RBNode rbnode );
RBTree rbtree
- a handle to the tree into which to insert the node
RBNode rbnode
- the node to insert
This routine inserts a detached node into a binary tree. It assumes
that the tree's insert/delete comparison function can be applied to
the data in the passed node. The node handle must have been
obtained from rbtree_detach_node
.
It returns `1' if the node is NULL
or NIL(tree)
,
`0' otherwise.