aboutsummaryrefslogtreecommitdiff
path: root/src/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm.c')
-rw-r--r--src/vm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vm.c b/src/vm.c
index 335eb48..8b1b13a 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -20,14 +20,14 @@ static void free_expression(UwUVMExpression *expr)
void vm_run_file(const char *progname, const char *modname)
{
UwUVMProgram program = create_program(progname, modname);
- UwUVMValue result = ((UwUVMValue (*)(UwUVMFunction *, UwUVMArgs args)) dlsym(program.api_library, "uwuvm_run_function"))(program.main_function, (UwUVMArgs) {.num = 0, .evaluated = NULL, .unevaluated = NULL, .super = NULL});
+ UwUVMValue result = ((UwUVMValue (*)(UwUVMFunction *, size_t, UwUVMExpression *, UwUVMArgs *)) dlsym(program.api_library, "uwuvm_call_function"))(program.main_function, 0, NULL, NULL);
- char *str = ((char *(*)(UwUVMValue)) dlsym(program.api_library, "uwustr_get"))(result);
+ char *str = ((char *(*)(UwUVMValue)) dlsym(program.api_library, "uwuvm_print_value"))(result);
printf("%s\n", str);
free(str);
- ((void (*)(UwUVMValue)) dlsym(program.api_library, "uwuvm_free_value"))(result);
+ ((void (*)(UwUVMValue)) dlsym(program.api_library, "uwuvm_delet_value"))(result);
for (size_t i = 0; i < program.num_functions; i++) {
UwUVMFunction *function = program.functions[i];