diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-11 06:44:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-11 06:44:36 -0700 |
commit | 81c97fcb7736ee17d581d6c78af567e2f7d25ca0 (patch) | |
tree | 28dbfe5937cad52ed9f2b2f5cf97d1c5da3f01a3 /hash.c | |
parent | 46ae35f5b87efa3582aa8564839b30acbeeffe57 (diff) | |
download | txr-81c97fcb7736ee17d581d6c78af567e2f7d25ca0.tar.gz txr-81c97fcb7736ee17d581d6c78af567e2f7d25ca0.tar.bz2 txr-81c97fcb7736ee17d581d6c78af567e2f7d25ca0.zip |
ffi: two-argument form of sizeof.
If sizeof is given an extra argument (an expression which
evaluates to an object), it can calculate the dynamic size of
the FFI type in relation to representing that object.
* ffi.c (dyn_size): New static function.
(ffi_init): Register sys:dyn-size intrinsic.
* share/txr/stdlib/ffi.tl (sizeof): Support additional
argument, avoiding run-time compilation of the type expression
with the help of load-time.
* txr.1: Update documentation for sizeof macro.
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions