Skip to content

Commit

Permalink
text: mark text_size argument as const
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Oct 10, 2020
1 parent c3caed4 commit 26eec44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion text.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion text.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 26eec44

Please sign in to comment.