diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-07 09:00:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-07 09:00:16 -0700 |
commit | b6b83892c085740529d0c38e9cf45ee1df42f97c (patch) | |
tree | 7b2c37e646c807a3e64eb207325c23346a9bc291 /ffi.h | |
parent | 7d9aa1c81c6342417602ff051fe17814e814cfb6 (diff) | |
download | txr-b6b83892c085740529d0c38e9cf45ee1df42f97c.tar.gz txr-b6b83892c085740529d0c38e9cf45ee1df42f97c.tar.bz2 txr-b6b83892c085740529d0c38e9cf45ee1df42f97c.zip |
ffi: bufix: elide get if copy flag is false.
* ffi.c (ffi_struct_in, ffi_array_in): Only fall back on get
if the copy flag is true. If the copy flag is false, we must
not extract. That's not ony as an optimization (no point in
extracting back from by-value objects). We also avoid
extracting from pointers we don't own, like in the case
of str-d, where the pointer is owned by the foreign function
and may have been freed.
Diffstat (limited to 'ffi.h')
0 files changed, 0 insertions, 0 deletions