add string_table to manage container STAB data

This commit is contained in:
2025-02-16 08:42:02 +00:00
parent c2094e0211
commit e61e7afaff
2 changed files with 127 additions and 0 deletions

17
src/string-table.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef STRING_TABLE_H_
#define STRING_TABLE_H_
#include <blue/core/btree.h>
struct string_table {
b_btree s_hash_tree;
b_btree s_offset_tree;
size_t s_next_offset;
};
extern void string_table_init(struct string_table *out);
extern void string_table_finish(struct string_table *tab);
extern size_t string_table_get(struct string_table *tab, const char *s);
#endif