diff --git a/m-array.h b/m-array.h index 3e5f469a..c494004f 100644 --- a/m-array.h +++ b/m-array.h @@ -474,15 +474,6 @@ ) /* IF INIT_MOVE method */ \ } \ \ - static inline void \ - M_C3(array_, name, _shrink_to_fit)(M_C3(array_, name,_t) v) \ - { \ - assert (v != NULL && v->size <= v->alloc); \ - v->ptr = M_GET_REALLOC oplist (type, v->ptr, v->size); \ - assert(v->ptr != NULL || v->size == 0); \ - v->alloc = v->size; \ - } \ - \ static inline type * \ M_C3(array_, name, _get)(M_C3(array_, name,_t) v, size_t i) \ { \ diff --git a/m-bitset.h b/m-bitset.h index fcd54a6f..c1ea68fe 100644 --- a/m-bitset.h +++ b/m-bitset.h @@ -625,6 +625,6 @@ bitset_hash(const bitset_t dest) ,EQUAL(bitset_equal_p) \ ) -// TODO: set_at2, insert_v, remove_v, shrink_to_fit +// TODO: set_at2, insert_v, remove_v, reserve #endif diff --git a/tests/test-marray.c b/tests/test-marray.c index e0fec809..1f08e5ee 100644 --- a/tests/test-marray.c +++ b/tests/test-marray.c @@ -104,7 +104,7 @@ static void test_uint(void) assert(*array_uint_cget(v, 2) == 4); assert(*array_uint_cget(v, 3) == 3); - array_uint_shrink_to_fit(v); + array_uint_reserve(v, 0); assert(array_uint_capacity(v) == array_uint_size(v)); const unsigned int *src = array_uint_cget(v, 4);