Skip to content

hssort

Category: hash
GitHub: cute_hashtable.h


Sorts the {key, item} pairs in the table by keys, where the keys are treated as C-strings.

#define hssort(h) cf_hashtable_ssort(h)
Parameters Description
h The hashtable. Can be NULL. Needs to be a pointer to the type of items in the table.

Remarks

The keys and items returned by hkeys and hitems will be sorted. Normally it's not valid to store strings as keys, since all keys are simply typecasted to uint64_t. However, if you use sintern each unique string has a unique and stable pointer, making them valid keys for hashtables. This is not a stable sort.

htbl
hswap
hsort
sintern
hsisort