aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--array.c2
-rw-r--r--array.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/array.c b/array.c
index 0f1e1f0..9c40299 100644
--- a/array.c
+++ b/array.c
@@ -63,7 +63,7 @@ void *array_get(const Array *arr, size_t idx) {
return arr->items + (idx * arr->elem_size);
}
-void *array_get_ptr(Array *arr, size_t idx) {
+void *array_get_ptr(const Array *arr, size_t idx) {
if (arr->elem_size != sizeof(void*)) {
errno = ENOTSUP;
return NULL;
diff --git a/array.h b/array.h
index 6c9d8a8..69d6047 100644
--- a/array.h
+++ b/array.h
@@ -76,7 +76,7 @@ void *array_get(const Array*, size_t idx);
*/
bool array_set(Array*, size_t idx, void *item);
/** Dereference pointer stored in array element. */
-void *array_get_ptr(Array*, size_t idx);
+void *array_get_ptr(const Array*, size_t idx);
/** Store the address to which ``item`` points to into the array. */
bool array_set_ptr(Array*, size_t idx, void *item);
/** Add element to the end of the array. */