diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-07-05 16:09:34 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-07-11 15:49:14 +0200 |
commit | b11a2fa661058ef9788b9ff4d1e22ce98f1cbda7 (patch) | |
tree | fde48d95dfb14e6f36d54701903a8f2dc09fe403 /main.c | |
parent | 900b2a3f05fb1ec3844cc6bde9cd2fc03d168078 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |