diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-07 00:25:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-07 00:25:46 -0700 |
commit | 25eb966ccb8b61dbe4ff2b2e1970e1e9caa0282f (patch) | |
tree | 427b31848c6040b83e69003c95f5f7c2d06bfd0d /HACKING-toc.txr | |
parent | 586d5d840219a76bd8d36e3b04951e3377709fbd (diff) | |
download | txr-25eb966ccb8b61dbe4ff2b2e1970e1e9caa0282f.tar.gz txr-25eb966ccb8b61dbe4ff2b2e1970e1e9caa0282f.tar.bz2 txr-25eb966ccb8b61dbe4ff2b2e1970e1e9caa0282f.zip |
lazy-stream-cons: control close throwing behavior.
* eval.c (eval_init): Update registrations of lazy-stream-cons
and get-lines with one more optional argument.
* lib.c (simple_lazy_stream_func_nt, lazy_stream_func_nt): New
static functions.
(lazy_stream_cons): Take a new argument, no_throw_close,
defaulting it to nil. When calling close_stream directly, pass
the inverted value of no_throw_close. Choose the new _nt
functions for the lazy list if no_throw_close is true; those
functions pass nil as the second argument of close_stream.
* lib.h (lazy_stream_cons): Declaration updated.
* match.c (v_next_impl, open_data_source, match_fun): Pass
down the nothrow value to lazy_stream_cons, or else nil in
situations when that is not applicable or there is no such
value. Thus the :nothrow feature of v_next will now not only
ensure that there is no exception when opening the stream but
also when closing it. Unusual situations encountered when
the lazy list reads from the stream still throw.
* txr.1: Documented.
Diffstat (limited to 'HACKING-toc.txr')
0 files changed, 0 insertions, 0 deletions