Change WASM_ANYREF to WASM_EXTERNREF (#3426)

wasm-c-api wasm.h had changed WASM_ANYREF to WASM_EXTERNREF,
we had better change it in WAMR also:
2ce1367c9d/include/wasm.h (L185)
This commit is contained in:
Wenyong Huang
2024-05-14 11:08:16 +08:00
committed by GitHub
parent 004d07bb86
commit 773efc006d
12 changed files with 42 additions and 42 deletions

View File

@ -211,7 +211,7 @@ func (self *Instance) CallFuncV(funcName string,
case int32:
if (param_types[i] != C.WASM_I32 &&
param_types[i] != C.WASM_FUNCREF &&
param_types[i] != C.WASM_ANYREF) {
param_types[i] != C.WASM_EXTERNREF) {
str := "CallFunc error: invalid param type %d, " +
"expect i32 but got other"
return fmt.Errorf(str, param_types[i])
@ -273,7 +273,7 @@ func (self *Instance) CallFuncV(funcName string,
fallthrough
case C.WASM_FUNCREF:
fallthrough
case C.WASM_ANYREF:
case C.WASM_EXTERNREF:
i32 := (int32)(argv[argc])
results[i] = i32
argc++