From bef9fcfda2f065e6ddbfacca4c39e12061bfd204 Mon Sep 17 00:00:00 2001 From: Su Yihan Date: Fri, 12 Apr 2024 21:04:42 +0800 Subject: [PATCH] adapt for WAMR funciton definition update (#153) Signed-off-by: Su Yihan --- runtime-library/deps/download.sh | 2 +- runtime-library/main.c | 2 +- runtime-library/utils/object_utils.c | 2 +- runtime-library/utils/type_utils.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime-library/deps/download.sh b/runtime-library/deps/download.sh index 2a9b37e3..53f0e924 100755 --- a/runtime-library/deps/download.sh +++ b/runtime-library/deps/download.sh @@ -10,5 +10,5 @@ if [ ! -d "quickjs" ]; then fi if [ ! -d "wamr-gc" ]; then - git clone --branch dev/gc_refactor --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git wamr-gc + git clone --branch main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git wamr-gc fi diff --git a/runtime-library/main.c b/runtime-library/main.c index 2fce1e0d..ce4a82b3 100644 --- a/runtime-library/main.c +++ b/runtime-library/main.c @@ -842,7 +842,7 @@ main(int argc, char *argv[]) ret = 0; - start_func = wasm_runtime_lookup_function(wasm_module_inst, "_entry", NULL); + start_func = wasm_runtime_lookup_function(wasm_module_inst, "_entry"); if (!start_func) { printf("%s\n", "Missing '_entry' function in wasm module\n"); goto fail4; diff --git a/runtime-library/utils/object_utils.c b/runtime-library/utils/object_utils.c index 85941d69..58886abb 100644 --- a/runtime-library/utils/object_utils.c +++ b/runtime-library/utils/object_utils.c @@ -173,7 +173,7 @@ box_value_to_any(wasm_exec_env_t exec_env, dyn_ctx_t ctx, wasm_value_t *value, } alloc_extref_table_slot = wasm_runtime_lookup_function( - module_inst, "allocExtRefTableSlot", "(r)i"); + module_inst, "allocExtRefTableSlot"); bh_assert(alloc_extref_table_slot); bh_memcpy_s(extref_argv + occupied_slots, diff --git a/runtime-library/utils/type_utils.c b/runtime-library/utils/type_utils.c index 4624684c..04ea33bf 100644 --- a/runtime-library/utils/type_utils.c +++ b/runtime-library/utils/type_utils.c @@ -1131,7 +1131,7 @@ get_prop_index_of_struct(wasm_exec_env_t exec_env, const char *prop, &meta); struct_type = (wasm_struct_type_t)wasm_obj_get_defined_type(*wasm_obj); func = wasm_runtime_lookup_function(module_inst, - "find_property_flag_and_index", NULL); + "find_property_flag_and_index"); bh_assert(func); argv[0] = meta.i32;