From 9f342255a2260480701cc2ac2d0c623d4aba1348 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 3 Jan 2023 00:27:06 -0800 Subject: add some comments; fix some bugs in advance --- src/include/hash_table.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include/hash_table.h') diff --git a/src/include/hash_table.h b/src/include/hash_table.h index df2d368..833daee 100644 --- a/src/include/hash_table.h +++ b/src/include/hash_table.h @@ -32,6 +32,8 @@ void sl_list_add(sl_list_t *l, char *key, ast_t *value); ast_t *sl_list_get(sl_list_t *l, char *key); +bool sl_list_exists(sl_list_t *l, char *key); + void sl_list_free(sl_list_t *l); hash_table_t *init_hash_table(int size); @@ -40,6 +42,8 @@ void hash_table_add(hash_table_t *h, char *key, ast_t *value); ast_t *hash_table_get(hash_table_t *h, char *key); +bool hash_table_exists(hash_table_t *h, char *key); + unsigned long hash(char *key, int size); void hash_table_free(hash_table_t *h); -- cgit