summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-07-20 00:12:08 +0200
committerJo-Philipp Wich <jo@mein.io>2022-07-30 00:41:56 +0200
commitc441f65c19e62eefaa8af37ae74ae47c4d4eaa4e (patch)
treececea2c2870311d7abc4c741bb1b38a5dc1ca454 /lib.c
parent23224687205076604c1e0e5829690a5b6e150c06 (diff)
program: add infrastructure to handle multiple sources per program
The upcoming module support requires maintaining multiple source objects within the same program, so add the necessary infrastructure for it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 0dee073..779e3f5 100644
--- a/lib.c
+++ b/lib.c
@@ -2378,7 +2378,7 @@ uc_include_common(uc_vm_t *vm, size_t nargs, bool raw_mode)
if (!closure)
return NULL;
- p = include_path(closure->function->program->source->runpath, ucv_string_get(path));
+ p = include_path(uc_program_function_source(closure->function)->runpath, ucv_string_get(path));
if (!p) {
uc_vm_raise_exception(vm, EXCEPTION_RUNTIME,
@@ -2896,7 +2896,7 @@ uc_sourcepath(uc_vm_t *vm, size_t nargs)
continue;
}
- path = realpath(frame->closure->function->program->source->runpath, NULL);
+ path = realpath(uc_program_function_source(frame->closure->function)->runpath, NULL);
break;
}