From 15b3801eca45ce47c80f6eb19b45dbdbc2da83cf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 25 Jul 2024 07:07:55 -0700 Subject: lib: get rid of internal rewindable iter nonsense. Iterator rewinding is only used by the three functions isec, isecp and diff, which can easily just re-initialize the iterator. * lib.c (seq_iter_rewind): Static function removed. (seq_iter_init_with_info): Remove support_rewind argument, and adjust all code referencing it on the assumption that it's zero. (seq_iter_init_with_rewind): Static function removed. (seq_iter_init, iter_begin, iter_reset, nullify, find, rfind): Drop last argument from seq_iter_init_with_info. (diff, isec, iescp): Use seq_iter_init rather than seq_iter_init_with_rewind. Instead of seq_iter_rewind, just reinitialize the iterator. * lib.h (seq_iter_init_with_info): Declaration updated. * eval.c (tprint): Drop last argument from seq_iter_init_with_info. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index b5eb32dc..066e1c1c 100644 --- a/eval.c +++ b/eval.c @@ -6982,7 +6982,7 @@ val tprint(val obj, val out) seq_iter_t iter; val elem; - seq_iter_init_with_info(self, &iter, si, 0); + seq_iter_init_with_info(self, &iter, si); while (seq_get(&iter, &elem)) tprint(elem, out); -- cgit v1.2.3