summaryrefslogtreecommitdiff
path: root/include/str_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/str_table.h')
-rw-r--r--include/str_table.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/str_table.h b/include/str_table.h
index db36c5b..56b601a 100644
--- a/include/str_table.h
+++ b/include/str_table.h
@@ -6,6 +6,7 @@ typedef struct str_bucket_t {
struct str_bucket_t *next;
char *str;
size_t index;
+ size_t refcount;
} str_bucket_t;
/* Stores strings in a hash table and assigns an incremental, unique ID to
@@ -34,4 +35,10 @@ int str_table_get_index(str_table_t *table, const char *str, size_t *idx);
Returns NULL if the ID is unknown, i.e. out of bounds. */
const char *str_table_get_string(str_table_t *table, size_t index);
+void str_table_reset_ref_count(str_table_t *table);
+
+void str_table_add_ref(str_table_t *table, size_t index);
+
+size_t str_table_get_ref_count(str_table_t *table, size_t index);
+
#endif /* STR_TABLE_H */