aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-09-30 10:42:44 +0200
committerMarc André Tanner <mat@brain-dump.org>2020-10-10 10:03:17 +0200
commit26eec4478f6ed63404923ad4f3bf25f411a61d99 (patch)
tree73f3ebc0847a21edd427bf5171234a8e1278fedf
parentc3caed418e1472b649c6aafe0abe95e6f20aa39d (diff)
downloadvis-26eec4478f6ed63404923ad4f3bf25f411a61d99.tar.gz
vis-26eec4478f6ed63404923ad4f3bf25f411a61d99.tar.xz
text: mark text_size 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 eb4058d..096a8b7 100644
--- 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
index 03a1001..de73559 100644
--- 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.