diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-25 07:07:55 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-25 07:07:55 -0700 |
commit | 15b3801eca45ce47c80f6eb19b45dbdbc2da83cf (patch) | |
tree | e07e9bb6dbe3d2c9dd57bb03f8889fbeb9edf788 /lib.h | |
parent | f3e8151605506935a04ea34e758452bf55881e9b (diff) | |
download | txr-15b3801eca45ce47c80f6eb19b45dbdbc2da83cf.tar.gz txr-15b3801eca45ce47c80f6eb19b45dbdbc2da83cf.tar.bz2 txr-15b3801eca45ce47c80f6eb19b45dbdbc2da83cf.zip |
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.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -762,8 +762,7 @@ val subtypep(val sub, val sup); val typep(val obj, val type); seq_info_t seq_info(val cobj); void seq_iter_mark_op(struct seq_iter *it); -void seq_iter_init_with_info(val self, seq_iter_t *it, - seq_info_t si, int support_rewind); +void seq_iter_init_with_info(val self, seq_iter_t *it, seq_info_t si); void seq_iter_init(val self, seq_iter_t *it, val obj); INLINE int seq_get(seq_iter_t *it, val *pval) { return it->ops->get(it, pval); } INLINE int seq_peek(seq_iter_t *it, val *pval) { return it->ops->peek(it, pval); } |