From b6861148021df1682f424d3ce8e8051b80889b03 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Tue, 4 Aug 2026 23:52:08 -0400 Subject: unify hashmap type --- dseg.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'dseg.h') diff --git a/dseg.h b/dseg.h index 4decf2f..bceaac4 100644 --- a/dseg.h +++ b/dseg.h @@ -1,7 +1,7 @@ #ifndef DSEG_H #define DSEG_H -#include "ccc.h" +#include "hashmap.h" #include struct dseg_entry { @@ -14,15 +14,9 @@ struct dseg_entry { char* symbol; }; -struct dseg { - struct dseg_entry** entries; - integral_t sz; - integral_t cap; -}; - -void dseg_init(struct dseg* dseg); -void dseg_destroy(struct dseg* dseg); -const char* dseg_put(struct dseg* dseg, struct dseg_entry entry); -void emit_dseg(FILE* outfile, const struct dseg* dseg); +void dseg_init(struct hash_map* dseg); +void dseg_destroy(struct hash_map* dseg); +const char* dseg_put(struct hash_map* dseg, struct dseg_entry entry); +void emit_dseg(FILE* outfile, const struct hash_map* dseg); #endif -- cgit v1.2.3