sl_set_compare

March 26, 2020 Contributors

Name

sl_set_compare — Set the comparison functions

Synopsis

#include "skiplist.h"

| void **sl_set_compare** ( | sl, |   |
|   | comp, |   |
|   | compk); |   |

Skiplist * <var class="pdparam">sl</var>;
SkiplistComparator <var class="pdparam">comp</var>;
SkiplistComparator <var class="pdparam">compk</var>;

Description

Set the data to data and key to data comparison functions.

Parameters

sl

The Skiplist.

comp

A Skiplist comparator. A Skiplist comparator is defined as follows: typedef int (*SkiplistComparator) (const void *, const void *); .

compk

A Skiplist comparator.

Return Value

This function returns void.

Threading

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

See Also

“Skiplist”