summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-07 09:00:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-07 09:00:16 -0700
commitb6b83892c085740529d0c38e9cf45ee1df42f97c (patch)
tree7b2c37e646c807a3e64eb207325c23346a9bc291 /ffi.h
parent7d9aa1c81c6342417602ff051fe17814e814cfb6 (diff)
downloadtxr-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