diff options
Diffstat (limited to 'src/wasm-common.h')
-rw-r--r-- | src/wasm-common.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/wasm-common.h b/src/wasm-common.h index 365572da..4f257872 100644 --- a/src/wasm-common.h +++ b/src/wasm-common.h @@ -151,13 +151,6 @@ typedef enum WasmExternalKind { WASM_NUM_EXTERNAL_KINDS, } WasmExternalKind; -extern const char* g_wasm_kind_name[]; - -static WASM_INLINE const char* wasm_get_kind_name(WasmExternalKind kind) { - assert(kind < WASM_NUM_EXTERNAL_KINDS); - return g_wasm_kind_name[kind]; -} - typedef struct WasmLimits { uint64_t initial; uint64_t max; @@ -390,6 +383,7 @@ WasmBool wasm_is_naturally_aligned(WasmOpcode opcode, uint32_t alignment); uint32_t wasm_get_opcode_alignment(WasmOpcode opcode, uint32_t alignment); WasmStringSlice wasm_empty_string_slice(void); +WasmStringSlice wasm_string_slice_from_cstr(const char* string); WasmBool wasm_string_slices_are_equal(const WasmStringSlice*, const WasmStringSlice*); void wasm_destroy_string_slice(struct WasmAllocator*, WasmStringSlice*); @@ -452,6 +446,15 @@ static WASM_INLINE int wasm_get_opcode_memory_size(WasmOpcode opcode) { return g_wasm_opcode_info[opcode].memory_size; } +/* external kind */ + +extern const char* g_wasm_kind_name[]; + +static WASM_INLINE const char* wasm_get_kind_name(WasmExternalKind kind) { + assert(kind < WASM_NUM_EXTERNAL_KINDS); + return g_wasm_kind_name[kind]; +} + WASM_EXTERN_C_END #endif /* WASM_COMMON_H_ */ |