summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-25 07:07:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-25 07:07:55 -0700
commitf76871b3f548c5a76e5e8ebc24a0c2571bdebb57 (patch)
treee07e9bb6dbe3d2c9dd57bb03f8889fbeb9edf788 /lib.h
parent0de738cf7b535f70eeaf3b5452ed8a705cb03655 (diff)
downloadtxr-f76871b3f548c5a76e5e8ebc24a0c2571bdebb57.tar.gz
txr-f76871b3f548c5a76e5e8ebc24a0c2571bdebb57.tar.bz2
txr-f76871b3f548c5a76e5e8ebc24a0c2571bdebb57.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.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib.h b/lib.h
index 6010ebd2..a6684ca6 100644
--- a/lib.h
+++ b/lib.h
@@ -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); }