diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-03 21:15:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-03 21:15:12 -0700 |
commit | 80c4f6545a7b0a8ee7519f35756396be48f1bfa9 (patch) | |
tree | 4288d8b63e2b4a4323acbf420b2660d2bc71a39f /ffi.h | |
parent | e9c5c1a6108242c4585ada4ecf0235b2c796887a (diff) | |
download | txr-80c4f6545a7b0a8ee7519f35756396be48f1bfa9.tar.gz txr-80c4f6545a7b0a8ee7519f35756396be48f1bfa9.tar.bz2 txr-80c4f6545a7b0a8ee7519f35756396be48f1bfa9.zip |
ffi: new ptr-out-s type.
One more ptr type is useful. This type is for objects returned via
pointers embedded in arrays or structures, whereby the callee
establishes both the pointer and the data.
This is similar to ptr-out-d; the difference is that the
data has an indefinite lifetime ("s" denotes "static")
and so the pointer is not freed after the call takes place
and the data is extracted into Lisp objects.
* ffi.c (ptr_out_s_s): New symbol variable.
(ffi_ptr_out_s_in): New function.
(ffi_type_compile): Handle new ptr_out_s_s.
(ffi_init): Initialize ptr_out_s.
* ffi.h (ptr_out_s_s): Declared.
Diffstat (limited to 'ffi.h')
-rw-r--r-- | ffi.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -45,7 +45,7 @@ extern val str_d_s, wstr_s, wstr_d_s; extern val buf_d_s; -extern val ptr_in_s, ptr_out_s, ptr_in_d_s, ptr_out_d_s, ptr_s; +extern val ptr_in_s, ptr_out_s, ptr_in_d_s, ptr_out_d_s, ptr_out_s_s, ptr_s; extern val closure_s; |