Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wasm.h for anyref --> externref #148

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ enum wasm_valkind_enum {
WASM_I64,
WASM_F32,
WASM_F64,
WASM_ANYREF = 128,
WASM_EXTERNREF = 128,
WASM_FUNCREF,
};

Expand All @@ -185,10 +185,10 @@ WASM_API_EXTERN own wasm_valtype_t* wasm_valtype_new(wasm_valkind_t);
WASM_API_EXTERN wasm_valkind_t wasm_valtype_kind(const wasm_valtype_t*);

static inline bool wasm_valkind_is_num(wasm_valkind_t k) {
return k < WASM_ANYREF;
return k < WASM_EXTERNREF;
}
static inline bool wasm_valkind_is_ref(wasm_valkind_t k) {
return k >= WASM_ANYREF;
return k >= WASM_EXTERNREF;
}

static inline bool wasm_valtype_is_num(const wasm_valtype_t* t) {
Expand Down Expand Up @@ -535,8 +535,8 @@ static inline own wasm_valtype_t* wasm_valtype_new_f64() {
return wasm_valtype_new(WASM_F64);
}

static inline own wasm_valtype_t* wasm_valtype_new_anyref() {
return wasm_valtype_new(WASM_ANYREF);
static inline own wasm_valtype_t* wasm_valtype_new_externref() {
return wasm_valtype_new(WASM_EXTERNREF);
}
static inline own wasm_valtype_t* wasm_valtype_new_funcref() {
return wasm_valtype_new(WASM_FUNCREF);
Expand Down