diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 21:38:50 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 21:38:50 -0700 |
commit | 3fbc79ce6f249c527f63763c02ea384e51180f99 (patch) | |
tree | 18d4c5a41b6c58cdb879f32ecb47de6dc469af40 /tests/017/glob-carray.expected | |
parent | 5fc47b3d24f1fa568ffb54db8e8054f190e2fb2b (diff) | |
download | txr-3fbc79ce6f249c527f63763c02ea384e51180f99.tar.gz txr-3fbc79ce6f249c527f63763c02ea384e51180f99.tar.bz2 txr-3fbc79ce6f249c527f63763c02ea384e51180f99.zip |
ffi: add two tests based on realpath.
The realpath function is called using FFI. One approach
passes a null pointer, so that the function dynamically
allocates. The return value is str-d, causing FFI to take
ownership of the pointer, freeing it. The other approach
is to pass a pointer to a large null-terminated character
array, marked for ownership transfer to the function. FFI
allocates it and puts the argument into it, which is just
a dummy empty string. The function fills that buffer and
returns it. The return is captured as a str-d, so FFI takes
ownership back, and frees the buffer.
* tests/017/realpath.tl: New function.
* tests/017/realpath.expected: Likewise.
Diffstat (limited to 'tests/017/glob-carray.expected')
0 files changed, 0 insertions, 0 deletions