From 1a3fe1a084fd68ff4f10ef8cf031f347563b79ca Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 28 Aug 2022 12:01:52 -0700 Subject: New macro: close-lazy-streams. * lib.c (lazy_stream_s): New symbol variable. (lazy_streams_binding): New static variable. (lazy_stream_register): New static function (lazy_stream_cons): If the stream is associated with a lazy cons, register it with lazy_stream_register. (obj_init): gc-protect lazy_streams_binding variable. Intern the sys:*lazy-streams* symbol. * lib.h (lazy_streams_s): Declared. * eval.c (eval_init): Register sys:*lazy-streams* special variable. * stdlib/getput.tl (close-lazy-streams): New macro. * autoload.c (getput_set_entries): Trigger autload on close-lazy-streams symbol. * txr.1: Documented. * stdlib/doc-syms.tl: Updated. --- stdlib/doc-syms.tl | 1 + 1 file changed, 1 insertion(+) (limited to 'stdlib/doc-syms.tl') diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl index 5d056427..e9685e70 100644 --- a/stdlib/doc-syms.tl +++ b/stdlib/doc-syms.tl @@ -338,6 +338,7 @@ ("clock-t" "N-01B6F219") ("clockid-t" "N-01153D9E") ("close" "D-0016") + ("close-lazy-streams" "N-00B8ACD5") ("close-stream" "N-00596930") ("closedir" "N-01FEE88A") ("closelog" "N-02CEE7EA") -- cgit v1.2.3