summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index 1099f7fc..a0f58e9b 100644
--- a/ffi.c
+++ b/ffi.c
@@ -5974,7 +5974,10 @@ static val cptr_out(val cptr, val obj, val type_in)
val type = default_arg(type_in, ffi_type_lookup_checked(self, cptr->co.cls));
struct txr_ffi_type *tft = ffi_type_struct_checked(self, type);
if (data != 0) {
- tft->out(tft, 0, obj, data, self);
+ if (tft->out != 0)
+ tft->out(tft, 0, obj, data, self);
+ else
+ tft->put(tft, obj, data, self);
return obj;
}
uw_throwf(type_error_s, lit("~a: ~s is a null pointer"), self, cptr, nao);