From a2316394d35eb548545730cbf2b57b27e733214c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 19 Apr 2017 10:08:18 +0200 Subject: array: implement array_resize --- array.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'array.h') diff --git a/array.h b/array.h index b369d68..5664f5a 100644 --- a/array.h +++ b/array.h @@ -58,5 +58,8 @@ size_t array_length(Array*); size_t array_capacity(Array*); /* remove all elements at index >= length, keep allocated memory */ bool array_truncate(Array*, size_t length); +/* change length if it is less than the current capacity, newly + * accesible elements preserve their previous values */ +bool array_resize(Array*, size_t length); #endif -- cgit v1.2.3