From 59c44f90e6147dbf294d4fcedb0341de22228410 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Fri, 10 Jul 2020 13:07:35 -0400 Subject: [PATCH] chore: refactor out i16 --- runtime/compiletime/memory/64bit_nix.c | 8 ++++---- runtime/include/types.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/runtime/compiletime/memory/64bit_nix.c b/runtime/compiletime/memory/64bit_nix.c index ea41fc3..d51b4d6 100644 --- a/runtime/compiletime/memory/64bit_nix.c +++ b/runtime/compiletime/memory/64bit_nix.c @@ -31,13 +31,13 @@ get_i8(int32_t offset) return *(i8 *)address; } -INLINE i16 +INLINE int16_t get_i16(int32_t offset) { char *mem_as_chars = (char *)local_sandbox_context_cache.linear_memory_start; void *address = &mem_as_chars[offset]; - return *(i16 *)address; + return *(int16_t *)address; } INLINE int32_t @@ -105,12 +105,12 @@ set_i8(int32_t offset, i8 v) } INLINE void -set_i16(int32_t offset, i16 v) +set_i16(int32_t offset, int16_t v) { char *mem_as_chars = (char *)local_sandbox_context_cache.linear_memory_start; void *address = &mem_as_chars[offset]; - *(i16 *)address = v; + *(int16_t *)address = v; } INLINE void diff --git a/runtime/include/types.h b/runtime/include/types.h index 74e1f58..6dfa980 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -38,7 +38,6 @@ /* Type alias's so I don't have to write uint32_t a million times */ typedef signed char i8; typedef unsigned char u8; -typedef int16_t i16; /* FIXME: per-module configuration? */ #define WASM_PAGE_SIZE (1024 * 64) /* 64KB */