diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-08-19 23:02:07 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-08-19 23:02:07 +0100 |
commit | 6dfe3e72a168655f1e70adae90eba953ef47696d (patch) | |
tree | 0a517cb45a14469d03d3e13aee1dd4a7d3b501d0 /main.c | |
parent | e7f4b0440c144430c82b15224188904009c36cdb (diff) | |
download | alisp-6dfe3e72a168655f1e70adae90eba953ef47696d.tar.gz alisp-6dfe3e72a168655f1e70adae90eba953ef47696d.tar.bz2 alisp-6dfe3e72a168655f1e70adae90eba953ef47696d.zip |
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.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |