diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-06 06:17:45 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-06 06:17:45 -0800 |
commit | f018af6fe6b0c867c747217890b8b02d8e6d7ffb (patch) | |
tree | 9b52ade1de02c1420f3858fa1c32d70b6bbc0eaa /rand.h | |
parent | 45412f6aef55df4f83f54b2b5445f673bfeee691 (diff) | |
download | txr-f018af6fe6b0c867c747217890b8b02d8e6d7ffb.tar.gz txr-f018af6fe6b0c867c747217890b8b02d8e6d7ffb.tar.bz2 txr-f018af6fe6b0c867c747217890b8b02d8e6d7ffb.zip |
ffi: allow init-forms for slots.
* ffi.c (ffi_memb_compile): Don't complain about
three-argument slot specifiers, only about longer ones.
(ffi_struct_init): New static function.
(ffi_type_compile): Deal with third element in the slot
syntax. If there are any non-nil initializing expressions,
then we when we call make_struct_type, we specify an initfun,
which will plant the values into the slots, using logic
similar to that of the initfun generated defstruct,
except that the init-forms are reduced to values up-front.
* txr.1: Specify optional init-form for slots in FFI
struct syntax.
Diffstat (limited to 'rand.h')
0 files changed, 0 insertions, 0 deletions