diff options
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |