symtable: sym_table_cleanup -> sym_table_free

This commit is contained in:
2026-02-05 05:39:22 +00:00
parent 66770f22d9
commit 34d3417e74
4 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ typedef struct
void sym_table_init(sym_table_t *); void sym_table_init(sym_table_t *);
char *sym_table_find(sym_table_t *, sv_t); char *sym_table_find(sym_table_t *, sv_t);
void sym_table_cleanup(sym_table_t *); void sym_table_free(sym_table_t *);
#endif #endif

View File

@@ -26,7 +26,7 @@ void sys_free(sys_t *sys)
{ {
static_assert(NUM_TAGS == 5); static_assert(NUM_TAGS == 5);
sym_table_cleanup(&sys->symtable); sym_table_free(&sys->symtable);
if (sys->memory.size == 0) if (sys->memory.size == 0)
return; return;

View File

@@ -54,7 +54,7 @@ char *sym_table_find(sym_table_t *table, sv_t sv)
return ENTRY_GET(table, index).data; return ENTRY_GET(table, index).data;
} }
void sym_table_cleanup(sym_table_t *table) void sym_table_free(sym_table_t *table)
{ {
// Iterate through the strings and free each of them. // Iterate through the strings and free each of them.
sv_t current = {0}; sv_t current = {0};

View File

@@ -18,7 +18,7 @@ void symtable_test(void)
TEST(table.count == ARRSIZE(unique_words), "%lu == %lu", table.count, TEST(table.count == ARRSIZE(unique_words), "%lu == %lu", table.count,
ARRSIZE(unique_words)); ARRSIZE(unique_words));
sym_table_cleanup(&table); sym_table_free(&table);
TEST_PASSED(); TEST_PASSED();
} }