diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-26 05:57:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-26 05:57:37 -0700 |
commit | be83bc717db0375e19431fe38c0490ff1a9e40ec (patch) | |
tree | 354d2107e8a5d4b518b5081a036894b87fc82c68 /match.c | |
parent | d081a595dfa053c78f7e3f580f82ca7823f02f74 (diff) | |
download | txr-be83bc717db0375e19431fe38c0490ff1a9e40ec.tar.gz txr-be83bc717db0375e19431fe38c0490ff1a9e40ec.tar.bz2 txr-be83bc717db0375e19431fe38c0490ff1a9e40ec.zip |
ffi: support buf objects.
* buf.c (make_duplicate_buf, buf_get, buf_fill): New
functions.
* buf.h (make_duplicate_buf, buf_get, buf_fill): Declared.
* ffi.c (struct txr_ffi_type): New member, nelem.
Keeps track of number of elements, for types that are
FFI pointers. This lets us support the get method so that
a buf can be a C function return value, if its size is
declared in our FFI type system.
(ffi_buf_put, ffi_buf_get, ffi_buf_fill): New functions.
(ffi_type_compile): Handle two new cases of syntax for
buffers: (buf <size>) and buf.
Diffstat (limited to 'match.c')
0 files changed, 0 insertions, 0 deletions