diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-08-04 23:52:08 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-08-04 23:52:08 -0400 |
| commit | b6861148021df1682f424d3ce8e8051b80889b03 (patch) | |
| tree | d36a8dc9853ba7eddd58acf814a1caf9c0e1acfa /dseg.h | |
| parent | ebe7f44385c4be54afd2993d54ce6352f612f9fa (diff) | |
| download | ccc-b6861148021df1682f424d3ce8e8051b80889b03.tar.gz | |
unify hashmap type
Diffstat (limited to 'dseg.h')
| -rw-r--r-- | dseg.h | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -1,7 +1,7 @@ #ifndef DSEG_H #define DSEG_H -#include "ccc.h" +#include "hashmap.h" #include <stdio.h> 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 |
