summaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-05 16:09:34 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commitb11a2fa661058ef9788b9ff4d1e22ce98f1cbda7 (patch)
treefde48d95dfb14e6f36d54701903a8f2dc09fe403 /main.c
parent900b2a3f05fb1ec3844cc6bde9cd2fc03d168078 (diff)
vm: move global scope allocation into uc_vm_init()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 5d14c83..41b608e 100644
--- a/main.c
+++ b/main.c
@@ -96,7 +96,7 @@ parse(uc_parse_config *config, uc_source *src,
}
/* allocate global scope */
- globals = uc_alloc_global(&vm);
+ globals = uc_vm_scope_get(&vm);
/* register ARGV array */
arr = ucv_array_new_length(&vm, argc);
@@ -115,7 +115,7 @@ parse(uc_parse_config *config, uc_source *src,
/* load std functions into global scope */
uc_load_stdlib(globals);
- rc = uc_vm_execute(&vm, entry, globals, modules);
+ rc = uc_vm_execute(&vm, entry, modules);
if (rc) {
rc = 1;