From 4c52777ca9e52edd0bff76168d886de9757ea457 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 30 Dec 2021 16:53:37 +0100 Subject: Add :ref module and refactor type handling --- api/str.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api/str.c') diff --git a/api/str.c b/api/str.c index 84d2b10..eefd0d7 100644 --- a/api/str.c +++ b/api/str.c @@ -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, }; -- cgit v1.2.3