From d5e7498e1c5098c0dd9a9630929d45ba2c37a47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 30 Sep 2020 10:34:08 +0200 Subject: text: mark text_byte(s)_get argument as const --- text.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'text.h') diff --git a/text.h b/text.h index 454e2fb..51d92c4 100644 --- a/text.h +++ b/text.h @@ -221,7 +221,7 @@ size_t text_lineno_by_pos(Text*, size_t pos); * return an artificial NUL byte at EOF. * @endrst */ -bool text_byte_get(Text*, size_t pos, char *byte); +bool text_byte_get(const Text*, size_t pos, char *byte); /** * Store at most ``len`` bytes starting from ``pos`` into ``buf``. * @param pos The absolute starting position. @@ -232,7 +232,7 @@ bool text_byte_get(Text*, size_t pos, char *byte); * .. warning:: ``buf`` will not be NUL terminated. * @endrst */ -size_t text_bytes_get(Text*, size_t pos, size_t len, char *buf); +size_t text_bytes_get(const Text*, size_t pos, size_t len, char *buf); /** * Fetch text range into newly allocate memory region. * @param pos The absolute starting position. -- cgit v1.2.3