diff options
-rw-r--r-- | ffi.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1885,14 +1885,15 @@ static void ffi_i8_rput(struct txr_ffi_type *tft, val n, mem_t *dst, val self) { i8_t v = c_i8(n, self); (void) tft; - *coerce(i8_t *, dst) = v; + *coerce(ffi_arg *, dst) = v; } static val ffi_i8_rget(struct txr_ffi_type *tft, mem_t *src, val self) { + i8_t n = *coerce(ffi_arg *, src); (void) tft; (void) self; - return num_fast(*src); + return num_fast(n); } static void ffi_u8_rput(struct txr_ffi_type *tft, val n, mem_t *dst, val self) @@ -1900,14 +1901,15 @@ static void ffi_u8_rput(struct txr_ffi_type *tft, val n, mem_t *dst, val self) u8_t v = c_u8(n, self); (void) tft; (void) self; - *coerce(u8_t *, dst) = v; + *coerce(ffi_arg *, dst) = v; } static val ffi_u8_rget(struct txr_ffi_type *tft, mem_t *src, val self) { + u8_t n = *coerce(ffi_arg *, src); (void) tft; (void) self; - return num_fast(*coerce(u8_t *, src)); + return num_fast(n); } #if HAVE_I16 |