chore: refactor out i16

main
Sean McBride 4 years ago
parent 6b1880077a
commit 59c44f90e6

@ -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

@ -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 */

Loading…
Cancel
Save