From 1c11a13ff33873bcc79d4597d31cd252d5c6c1ae Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 4 Oct 2024 19:41:10 -0400 Subject: refactor masm to add codegen step --- masm/strtab.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'masm/strtab.c') diff --git a/masm/strtab.c b/masm/strtab.c index 404ea73..bd914b0 100644 --- a/masm/strtab.c +++ b/masm/strtab.c @@ -4,7 +4,7 @@ #include "asm.h" -int strtab_get_str(struct str_table *strtab, const char *str, size_t *res) +int strtab_get_str(struct elf_str_table *strtab, const char *str, size_t *res) { for (size_t i = 0; i < strtab->size; i ++) { if (strcmp(strtab->ptr + i, str) == 0) { @@ -17,7 +17,7 @@ int strtab_get_str(struct str_table *strtab, const char *str, size_t *res) return M_ERROR; } -int strtab_write_str(struct str_table *strtab, const char *str, size_t *res) +int strtab_write_str(struct elf_str_table *strtab, const char *str, size_t *res) { if (strtab_get_str(strtab, str, res) == M_SUCCESS) return M_SUCCESS; @@ -36,7 +36,7 @@ int strtab_write_str(struct str_table *strtab, const char *str, size_t *res) return M_SUCCESS; } -int strtab_init(struct str_table *strtab) +int strtab_init(struct elf_str_table *strtab) { strtab->size = 1; strtab->ptr = malloc(1); @@ -48,7 +48,7 @@ int strtab_init(struct str_table *strtab) return M_SUCCESS; } -void strtab_free(struct str_table *strtab) +void strtab_free(struct elf_str_table *strtab) { free(strtab->ptr); } -- cgit v1.2.3-freya