Name
sli_remove — Remove a node by key
Synopsis
#include "skiplist.h"
| int **sli_remove** (
| sl, | |
| | m, | |
| | myfree)
; | |
Skiplist * <var class="pdparam">sl</var>
;
skiplistnode * <var class="pdparam">m</var>
;
FreeFunc <var class="pdparam">myfree</var>
;
Description
This function is similar to sl_remove, but you pass in the node that you wish to remove. Any clones will also be removed.
- sl
-
The Skiplist.
- m
-
The node that you wish to remove.
- myfree
-
This is the optional, user-defined function that frees a data element in the skiplist. It is defined as:
typedef void (*FreeFunc) (void *);
On success this function returns the height of the resulting skiplist or 0
on error.
It is legal to call this function in any thread but skiplist functions are not thread safe.
See Also
Was this page helpful?