aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-09-30 10:37:05 +0200
committerMarc André Tanner <mat@brain-dump.org>2020-10-10 10:03:17 +0200
commite04061d71cb35f0541dda331f430b6becc3e6dc5 (patch)
treed8945257e3c3e9571f6a1c0a26def3bfbdd90bc8
parentd8d15d309e5468f6707d473129276b27173c078c (diff)
downloadvis-e04061d71cb35f0541dda331f430b6becc3e6dc5.tar.gz
vis-e04061d71cb35f0541dda331f430b6becc3e6dc5.tar.xz
text: mark text_iterator_byte_get argument as const
-rw-r--r--text.c2
-rw-r--r--text.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/text.c b/text.c
index 93f94a0..4c0b710 100644
--- a/text.c
+++ b/text.c
@@ -1409,7 +1409,7 @@ Iterator text_iterator_get(const Text *txt, size_t pos) {
return it;
}
-bool text_iterator_byte_get(Iterator *it, char *b) {
+bool text_iterator_byte_get(const Iterator *it, char *b) {
if (text_iterator_valid(it)) {
Text *txt = text_iterator_text(it);
if (it->start <= it->text && it->text < it->end) {
diff --git a/text.h b/text.h
index f63e73e..72ca1fc 100644
--- a/text.h
+++ b/text.h
@@ -261,7 +261,7 @@ bool text_iterator_prev(Iterator*);
* @defgroup iterator_byte
* @{
*/
-bool text_iterator_byte_get(Iterator*, char *b);
+bool text_iterator_byte_get(const Iterator*, char *b);
bool text_iterator_byte_prev(Iterator*, char *b);
bool text_iterator_byte_next(Iterator*, char *b);
bool text_iterator_byte_find_prev(Iterator*, char b);