vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit ed5227b557a0fc600cadf8bd8786a880febc630f parent fb98a3fad49ffd7947cc3c3bdf4913dfae398ccf Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 30 Sep 2020 10:35:14 +0200 text: mark text_bytes_alloc0 argument as const Diffstat:
| M | text.c | | | 2 | +- |
| M | text.h | | | 2 | +- |
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/text.c b/text.c @@ -1630,7 +1630,7 @@ size_t text_bytes_get(const Text *txt, size_t pos, size_t len, char *buf) { return len - rem; } -char *text_bytes_alloc0(Text *txt, size_t pos, size_t len) { +char *text_bytes_alloc0(const Text *txt, size_t pos, size_t len) { if (len == SIZE_MAX) return NULL; char *buf = malloc(len+1); diff --git a/text.h b/text.h @@ -243,7 +243,7 @@ size_t text_bytes_get(const Text*, size_t pos, size_t len, char *buf); * .. warning:: The returned pointer must be freed by the caller. * @endrst */ -char *text_bytes_alloc0(Text*, size_t pos, size_t len); +char *text_bytes_alloc0(const Text*, size_t pos, size_t len); /** * @} * @defgroup iterator