diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-13 07:40:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-13 07:40:11 -0700 |
commit | 39855e5aa9ffd3eac89a8ada790fcb5555bc3f65 (patch) | |
tree | 405033c36a75a2fc1321ddd0904de8da9bfb5e5d /tests/014/socket-basic.expected | |
parent | 133f25494e54eb508a0f19c3abdcfc24ccc4c1ce (diff) | |
download | txr-39855e5aa9ffd3eac89a8ada790fcb5555bc3f65.tar.gz txr-39855e5aa9ffd3eac89a8ada790fcb5555bc3f65.tar.bz2 txr-39855e5aa9ffd3eac89a8ada790fcb5555bc3f65.zip |
ffi: use dynamic allocation for wstr and wstr-d.
The direct pointer use of the wstr type causes problems
for callbacks. Plus allowing the foreign world to retain
the pointers into string objects is inherenty unsafe.
We can introduce an "unsafe wstr" type in a later release
for efficiency.
* ffi.c (ffi_wstr_in): New function.
(ffi_wstr_put): Removed by ffi_wstr_d_put rename.
(ffi_wstr_d_put): Renamed to ffi_wstr_put: both wstr and
wstr-d strings have a dynamically-allocating put.
(ffi_init_types): Give wstr type ffi_wstr_in handler.
wstr-d type's registration switched to ffi_wstr_put,
which is just ffi_wstr_d_put renamed.
* txr.1: Memory management notes for wstr updated.
Diffstat (limited to 'tests/014/socket-basic.expected')
0 files changed, 0 insertions, 0 deletions