From 70a8f737d4335f7c76c248febc9ad66abc394044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 10 Oct 2020 10:41:51 +0200 Subject: text: provide public text_iterator_init It can be used to initialize a (stack allocated) Iterator structure, avoiding the copying of the return value as done by text_iterator_get which depending on the implementation might be problematic. --- text.h | 1 + 1 file changed, 1 insertion(+) (limited to 'text.h') diff --git a/text.h b/text.h index 3bdb311..37e667b 100644 --- a/text.h +++ b/text.h @@ -250,6 +250,7 @@ char *text_bytes_alloc0(const Text*, size_t pos, size_t len); * @{ */ Iterator text_iterator_get(const Text*, size_t pos); +bool text_iterator_init(const Text*, Iterator*, size_t pos); const Text *text_iterator_text(const Iterator*); bool text_iterator_valid(const Iterator*); bool text_iterator_has_next(const Iterator*); -- cgit v1.2.3