diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-25 06:22:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-25 06:22:04 -0700 |
commit | e3590f297686097df40a3d6c83766130f948c3c6 (patch) | |
tree | 04ad267549f2b0b8c0100bf1502f77403825ebfe /ffi.c | |
parent | 02c9c3c46a4e77939f0b2f58b9dcfab950980a82 (diff) | |
download | txr-e3590f297686097df40a3d6c83766130f948c3c6.tar.gz txr-e3590f297686097df40a3d6c83766130f948c3c6.tar.bz2 txr-e3590f297686097df40a3d6c83766130f948c3c6.zip |
ffi: bugfix: incorrect error throws in buf ops.
* ffi.c (ffi_put_into, ffi_in, ffi_get, ffi_out): Add missing
error symbol argument in uw_throwf calls.
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2436,7 +2436,7 @@ val ffi_put_into(val dstbuf, val obj, val type) struct txr_ffi_type *tft = ffi_type_struct_checked(type); mem_t *dst = buf_get(dstbuf, self); if (lt(length_buf(dstbuf), num_fast(tft->size))) - uw_throwf(lit("~a: buffer ~s is too small for type ~s"), + uw_throwf(error_s, lit("~a: buffer ~s is too small for type ~s"), self, dstbuf, type, nao); tft->put(tft, obj, dst, self); return dstbuf; @@ -2458,7 +2458,7 @@ val ffi_in(val srcbuf, val obj, val type, val copy_p) struct txr_ffi_type *tft = ffi_type_struct_checked(type); mem_t *src = buf_get(srcbuf, self); if (lt(length_buf(srcbuf), num_fast(tft->size))) - uw_throwf(lit("~a: buffer ~s is too small for type ~s"), + uw_throwf(error_s, lit("~a: buffer ~s is too small for type ~s"), self, srcbuf, type, nao); if (tft->in != 0) return tft->in(tft, copy_p != nil, src, obj, self); @@ -2473,7 +2473,7 @@ val ffi_get(val srcbuf, val type) struct txr_ffi_type *tft = ffi_type_struct_checked(type); mem_t *src = buf_get(srcbuf, self); if (lt(length_buf(srcbuf), num_fast(tft->size))) - uw_throwf(lit("~a: buffer ~s is too small for type ~s"), + uw_throwf(error_s, lit("~a: buffer ~s is too small for type ~s"), self, srcbuf, type, nao); return tft->get(tft, src, self); } @@ -2484,7 +2484,7 @@ val ffi_out(val dstbuf, val obj, val type, val copy_p) struct txr_ffi_type *tft = ffi_type_struct_checked(type); mem_t *dst = buf_get(dstbuf, self); if (lt(length_buf(dstbuf), num_fast(tft->size))) - uw_throwf(lit("~a: buffer ~s is too small for type ~s"), + uw_throwf(error_s, lit("~a: buffer ~s is too small for type ~s"), self, dstbuf, type, nao); if (tft->out != 0) tft->out(tft, copy_p != nil, obj, dst, self); |