diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-30 09:03:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-30 09:03:52 -0700 |
commit | 899a209f71111857b39a2eacb46bcb2484130133 (patch) | |
tree | 4ec456f00c96775e7873cf85979e6ca8fb572225 /buf.c | |
parent | 310bc8183d5b3d794618ace3122f3aa2f16dc47a (diff) | |
download | txr-899a209f71111857b39a2eacb46bcb2484130133.tar.gz txr-899a209f71111857b39a2eacb46bcb2484130133.tar.bz2 txr-899a209f71111857b39a2eacb46bcb2484130133.zip |
ffi: implementing FFI callback closures.
* ffi.c (closure_s, ffi_closure_s): New symbol vars.
(struct txr_ffi_closure): New type.
(ffi_closure_struct, ffi_closure_struct_checked,
ffi_closure_print_op, ffi_closure_destroy_op,
ffi_closure_mark_op): New static functions.
(ffi_closure_ops): New static struct.
(ffi_closure_put): New static function.
(ffi_type_compile): Handle closure_s to support closure type
specifier.
(ffi_closure_dispatch): New static function.
(ffi_make_closure, ffi_closure_get_fptr): New function.
(ffi_init): Initialize closure_ and ffi_closure_s.
Register ffi-make-closure intrinsic.
* ffi.c (closure_s, ffi_closure_s, ffi_make_closure,
ffi_closure_get_fptr): Likewise.
Diffstat (limited to 'buf.c')
0 files changed, 0 insertions, 0 deletions