diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-29 10:12:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-29 10:12:04 -0700 |
commit | a77610707ca983a74e4f0af8926d663fdb71ecbf (patch) | |
tree | c1e29e6ac9bd7f1b99dfde14c6a871810c314466 /inst.nsi | |
parent | 6828981bba93db9fa7267f68516a6b3a0ecc157e (diff) | |
download | txr-a77610707ca983a74e4f0af8926d663fdb71ecbf.tar.gz txr-a77610707ca983a74e4f0af8926d663fdb71ecbf.tar.bz2 txr-a77610707ca983a74e4f0af8926d663fdb71ecbf.zip |
ffi: add ptr-in-d and ptr-out-d.
ptr-in-d means we pass a buffer to the foreign function,
which it owns and must free. We don't touch it.
ptr-out-d is meaningful for returned values. It means
that the function returned the object in a malloced
buffer which the caller owns. It will be freed.
* ffi.c (ptr_in_d_s, ptr_out_d_s): New symbol variables.
(ffi_ptr_in_d_put, ffi_ptr_out_d_get): New static functions.
(make_ffi_type_pointer): Don't set rtsize unconditionally
to 1. If we are passed a null pointer for the in function,
set it to zero. ptr-in-d does this: it has no need to free
the buffer since the called function owns it and so
there is no in function for that type.
(ffi_type_compile): Handle ptr_in_d_s and ptr_out_d_s.
(ffi_init): Initialize ptr_in_d_s and ptr_out_d_s.
* ffi.h (ptr_in_d_s, ptr_out_d_s): Declared.
Diffstat (limited to 'inst.nsi')
0 files changed, 0 insertions, 0 deletions