sl_find

March 26, 2020 Contributors

Name

sl_find — Find a specific node and return the node’s data

Synopsis

#include "skiplist.h"

| void * **sl_find** ( | sl, |   |
|   | key, |   |
|   | iter); |   |

Skiplist * <var class="pdparam">sl</var>;
const void * <var class="pdparam">key</var>;
skiplistnode ** <var class="pdparam">iter</var>;

Description

Find a specific node and return the node’s data. The iter parameter is optional.

Parameters

sl

The Skiplist.

key

The key.

iter

The list iterator.

Return Value

This function returns void.

Warning

When a value is returned, the memory is owned by the Skiplist. Your memory can become invalid if something else removes this value from the Skiplist.

Threading

It is legal to call this function in any thread but skiplist functions are not thread safe.

See Also

“Skiplist”