diff options
Diffstat (limited to 'src/hsearch.c')
-rw-r--r-- | src/hsearch.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hsearch.c b/src/hsearch.c index d8d395a..70d757a 100644 --- a/src/hsearch.c +++ b/src/hsearch.c @@ -156,6 +156,14 @@ htab_value* htab_find(struct htab *htab, const char* key) return &e->item.data; } +htab_value* htab_find2(struct htab *htab, const char* key, char **saved_key) +{ + struct elem *e = htab_find_elem(htab, key); + if(!e) return 0; + *saved_key = e->item.key; + return &e->item.data; +} + int htab_delete(struct htab *htab, const char* key) { struct elem *e = htab_find_elem(htab, key); |