diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-22 20:41:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-22 20:41:06 -0700 |
commit | 3c69ae9ca11ac0f4bcfe6f689240fa6ddef6c082 (patch) | |
tree | 117f9a93280a53bf215ba3541fb6ad86301c52f2 | |
parent | f94a7a41c6deb13f1db805842dcede803102bfc5 (diff) | |
download | txr-3c69ae9ca11ac0f4bcfe6f689240fa6ddef6c082.tar.gz txr-3c69ae9ca11ac0f4bcfe6f689240fa6ddef6c082.tar.bz2 txr-3c69ae9ca11ac0f4bcfe6f689240fa6ddef6c082.zip |
ffi: fix crash: carray argument type.
* ffi.c (make_ffi_type_pointer): Set the by_value_in flag only if the in
function has been specified. Otherwise tft->in is a null pointer and
will be used if this pointer type appears as an argument.
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3164,7 +3164,7 @@ static val make_ffi_type_pointer(val syntax, val lisp_type, tft->alloc = ffi_fixed_alloc; tft->dynsize = ffi_fixed_dynsize; tft->free = free; - tft->by_value_in = 1; + tft->by_value_in = (in != 0); return obj; } |