Skip to main content

ddsrt_avl_insert

Function ddsrt_avl_insert 

Source
pub unsafe extern "C" fn ddsrt_avl_insert(
    td: *const ddsrt_avl_treedef_t,
    tree: *mut ddsrt_avl_tree_t,
    vnode: *mut c_void,
)
Expand description

@brief Insert a node into the tree.

There is no protection against duplicates (which causes a crash if the treedef says duplicates are not allowed). If you want a safe insert, you should use @ref ddsrt_avl_lookup_ipath to check for existence, then insert using @ref ddsrt_avl_insert_ipath.

@param[in] td treedef of the tree @param[in,out] tree the avl tree @param[in] vnode the node to insert @see ddsrt_avl_delete