diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-06 09:00:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-06 09:00:22 -0700 |
commit | bd56945aaead936ff077bb33ddcaac5583cb1523 (patch) | |
tree | 6d2028b42f356377812993a1ef3ddaec48f98ca1 /lisplib.c | |
parent | d9d8aeb709d25a0b2691ef1bb9e35b8f5f972af2 (diff) | |
download | txr-bd56945aaead936ff077bb33ddcaac5583cb1523.tar.gz txr-bd56945aaead936ff077bb33ddcaac5583cb1523.tar.bz2 txr-bd56945aaead936ff077bb33ddcaac5583cb1523.zip |
ffi: handle copy flag in str type's in virtual.
This solves the second issue described in parent
commit. When a str type is passed in-out using
(ptr str) in a struct or array, the struct or array
is not picking up the new string. The pointer is
freed, but the old object persists.
* ffi.c (ffi_str_in): Function renamed to ffi_str_in. If the
copy flag is true, retrieves a string from the pointer and
that string is returned instead of the incoming one, mapping a
null pointer to nil. Either way, the pointer is freed. Since
ffi_ptr_out_in passes 1 for the copy flag, that ensures we
extract the new string and plant it into the array.
Diffstat (limited to 'lisplib.c')
0 files changed, 0 insertions, 0 deletions