summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-07 09:09:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-07 09:09:03 -0700
commitfeea17487b17ca381b6d740ac50a76248f1d033c (patch)
tree03deaf4a659c7459c2600d3b916baa867c1ee4bc /ffi.h
parentb6b83892c085740529d0c38e9cf45ee1df42f97c (diff)
downloadtxr-feea17487b17ca381b6d740ac50a76248f1d033c.tar.gz
txr-feea17487b17ca381b6d740ac50a76248f1d033c.tar.bz2
txr-feea17487b17ca381b6d740ac50a76248f1d033c.zip
ffi: bugfix: all in calls must fall back on get.
* ffi.c (ffi_ptr_out_in, ffi_ptr_out_s_in): If the target type has no in handler, fall back on its get. Here, it is without regard for the copy flag, because a zero value of that flag just indicates that the ptr-out itself is passed by-value. The target object is never by value (ffi_in): Add copy flag parameter, so the full interface is exposed, like in ffi_out. Fall back on get, if there is no in and the copy flag is true. Just return the original object if the type has no in, and copy is false. (ffi_init): Registration of ffi-in adjusted to four parameters. * ffi.h (ffi_in): Declaration updated.
Diffstat (limited to 'ffi.h')
-rw-r--r--ffi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.h b/ffi.h
index fa559f54..e11d8b51 100644
--- a/ffi.h
+++ b/ffi.h
@@ -60,7 +60,7 @@ val ffi_typedef(val name, val type);
val ffi_size(val type);
val ffi_put_into(val dstbuf, val obj, val type);
val ffi_put(val obj, val type);
-val ffi_in(val srcbuf, val obj, val type);
+val ffi_in(val srcbuf, val obj, val type, val copy_p);
val ffi_get(val srcbuf, val type);
val ffi_out(val dstbuf, val obj, val type, val copy_p);
void ffi_init(void);