From ff43bd2fb2c2617b53a0157d62d07cf96b2ef92f Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sat, 20 Jan 2024 16:37:26 -0800 Subject: add more detailed error messages; fix a couple bugs --- include/stem.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/stem.h') diff --git a/include/stem.h b/include/stem.h index 69bfcb4..381b0ad 100644 --- a/include/stem.h +++ b/include/stem.h @@ -197,6 +197,9 @@ void sll_add(sll_t *l, string_t *key, void *v, void (*freefunc)(void *)); /*! Gets value by key from singly linked list. */ void *sll_get(sll_t *l, string_t *key); +/*! deletes item from singly linked list */ +void sll_delete(sll_t *l, string_t *k, void (*freefunc)(void *)); + /*! Frees singly linked list */ void sll_free(sll_t *l, void (*freefunc)(void *)); @@ -210,6 +213,9 @@ void ht_add(ht_t *h, string_t *key, void *v, void (*freefunc)(void *)); /*! Gets value from hash table by key */ void *ht_get(ht_t *h, string_t *key); +/*! Deletes item from hash table */ +void ht_delete(ht_t *h, string_t *key, void (*freefunc)(void *)); + /*! returns true if key exists in hash table. false otherwise */ bool ht_exists(ht_t *h, string_t *key); -- cgit