From c8302646d563898d2874cd0f4ce39f9b6c487bf3 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 8 Jul 2020 12:55:53 -0700 Subject: [PATCH] Update `wasm.h` for `anyref` --> `externref` The reference types proposal removed `anyref` and replaced it with `externref`. --- include/wasm.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/wasm.h b/include/wasm.h index 46e75ca..ff33c89 100644 --- a/include/wasm.h +++ b/include/wasm.h @@ -176,7 +176,7 @@ enum wasm_valkind_enum { WASM_I64, WASM_F32, WASM_F64, - WASM_ANYREF = 128, + WASM_EXTERNREF = 128, WASM_FUNCREF, }; @@ -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) { @@ -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);