diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-07-20 00:12:08 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-07-30 00:41:56 +0200 |
commit | c441f65c19e62eefaa8af37ae74ae47c4d4eaa4e (patch) | |
tree | cecea2c2870311d7abc4c741bb1b38a5dc1ca454 /lib.c | |
parent | 23224687205076604c1e0e5829690a5b6e150c06 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |