vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 1db20712a8e40c62380501b7f0493e42ab0602ee parent 18caf9c7e161e484ed3ab8845d2a78138d435fdc Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 30 Sep 2020 10:42:44 +0200 text: mark text_size 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 @@ -1641,7 +1641,7 @@ char *text_bytes_alloc0(const Text *txt, size_t pos, size_t len) { return buf; } -size_t text_size(Text *txt) { +size_t text_size(const Text *txt) { return txt->size; } diff --git a/text.h b/text.h @@ -119,7 +119,7 @@ void text_free(Text*); * @{ */ /** Return the size in bytes of the whole text. */ -size_t text_size(Text*); +size_t text_size(const Text*); /** * Get file information at time of load or last save, whichever happened more * recently.