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.
This commit is contained in:
4
main.c
4
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);
|
||||
|
||||
Reference in New Issue
Block a user