vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit c8a0a356043db7205131c291be0746108a70c764 parent 62f49a834ba71a0c1e31d8ba8f075b0d1fff6070 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 30 Sep 2020 10:58:19 +0200 text: mark text_mmaped 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 @@ -1379,7 +1379,7 @@ bool text_modified(const Text *txt) { return txt->saved_revision != txt->history; } -bool text_mmaped(Text *txt, const char *ptr) { +bool text_mmaped(const Text *txt, const char *ptr) { uintptr_t addr = (uintptr_t)ptr; for (size_t i = 0, len = array_length(&txt->blocks); i < len; i++) { Block *blk = array_get_ptr(&txt->blocks, i); diff --git a/text.h b/text.h @@ -411,7 +411,7 @@ ssize_t text_write_range(const Text*, const Filerange*, int fd); * Check whether ``ptr`` is part of a memory mapped region associated with * this text instance. */ -bool text_mmaped(Text*, const char *ptr); +bool text_mmaped(const Text*, const char *ptr); /** @} */ #endif