diff options
Diffstat (limited to 'libctf/ctf-hash.c')
-rw-r--r-- | libctf/ctf-hash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libctf/ctf-hash.c b/libctf/ctf-hash.c index 582f9de..202fad0 100644 --- a/libctf/ctf-hash.c +++ b/libctf/ctf-hash.c @@ -476,6 +476,13 @@ ctf_dynhash_next (ctf_dynhash_t *h, ctf_next_t **it, void **key, void **value) return ECTF_NEXT_END; } +int +ctf_dynhash_sort_by_name (const ctf_next_hkv_t *one, const ctf_next_hkv_t *two, + void *unused _libctf_unused_) +{ + return strcmp ((char *) one->hkv_key, (char *) two->hkv_key); +} + /* Traverse a sorted dynhash, in _next iterator form. See ctf_dynhash_next for notes on error returns, etc. |