vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 909624d6892650e2205b74640cf922b8f31c872a
parent 6efaf1ad347606417e5c2edaba9f9fd983d29182
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 30 Sep 2020 10:55:43 +0200

array: mark array_length argument as const

Diffstat:
Marray.c | 2+-
Marray.h | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/array.c b/array.c @@ -124,7 +124,7 @@ bool array_remove(Array *arr, size_t idx) { return true; } -size_t array_length(Array *arr) { +size_t array_length(const Array *arr) { return arr->len; } diff --git a/array.h b/array.h @@ -91,7 +91,7 @@ bool array_add_ptr(Array*, void *item); */ bool array_remove(Array*, size_t idx); /** Number of elements currently stored in the array. */ -size_t array_length(Array*); +size_t array_length(const Array*); /** Number of elements which can be stored without enlarging the array. */ size_t array_capacity(Array*); /** Remove all elements with index greater or equal to ``length``, keep allocated memory. */