From 6dfe3e72a168655f1e70adae90eba953ef47696d Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 19 Aug 2025 23:02:07 +0100 Subject: Make sym_table_find return the c-string in question directly I think we fall into a few traps if we return an sv_t directly. Think intent is clearer by returning the c-string directly. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 9b95a58..3aac0c0 100644 --- a/main.c +++ b/main.c @@ -50,8 +50,8 @@ int main(void) for (u64 i = 0; i < ARRSIZE(words); ++i) { - sv_t sv = sym_table_find(&table, SV(words[i], strlen(words[i]))); - printf("%s => %p\n", words[i], sv.data); + char *ptr = sym_table_find(&table, SV(words[i], strlen(words[i]))); + printf("%s => %p\n", words[i], ptr); } sym_table_cleanup(&table); -- cgit v1.2.3-13-gbd6f