diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 16:53:37 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 16:53:37 +0100 |
commit | 4c52777ca9e52edd0bff76168d886de9757ea457 (patch) | |
tree | 385c548fbae43f4b4764a1c32d5babe60c84aa4d /api/str.c | |
parent | 058d954e80f83c26deb209008f11d87a5b59418e (diff) | |
download | uwu-lang-4c52777ca9e52edd0bff76168d886de9757ea457.tar.xz |
Add :ref module and refactor type handling
Diffstat (limited to 'api/str.c')
-rw-r--r-- | api/str.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -12,10 +12,10 @@ UwUVMValue uwustr_create(const char *value) char *uwustr_get(UwUVMValue vm_value) { - vm_value.type->print(vm_value.data); + return uwuvm_print_value(vm_value); } -static void *uwustr_copy(void *data) +static void *uwustr_clone(void *data) { return strdup(data); } @@ -26,7 +26,7 @@ static char *uwustr_print(void *data) } UwUVMType uwustr_type = { - .copy = &uwustr_copy, - .delete = &free, + .clone = &uwustr_clone, + .delet = &free, .print = &uwustr_print, }; |