diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-19 10:08:18 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-19 10:08:18 +0200 |
| commit | a2316394d35eb548545730cbf2b57b27e733214c (patch) | |
| tree | e51bdad8fe02405ee38a735f62c0588c195c6667 /array.h | |
| parent | 7bc2fb906b41960eba4391d7dbf7526ea02d5afd (diff) | |
| download | vis-a2316394d35eb548545730cbf2b57b27e733214c.tar.gz vis-a2316394d35eb548545730cbf2b57b27e733214c.tar.xz | |
array: implement array_resize
Diffstat (limited to 'array.h')
| -rw-r--r-- | array.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |
