Update _insert prototype of array to match list _insert.
This commit is contained in:
1 parent
f25a59c43c
commit
64f3fc380e
2 files changed
+5
-5
No files matched your search
@@ -583,16 +583,16 @@
|
||||
} \
|
||||
\
|
||||
static inline void \
|
||||
M_C3(array_, name, _insert)(array_it_t it, type const x) \
|
||||
M_C3(array_, name, _insert)(array_t a, array_it_t it, type const x) \
|
||||
{ \
|
||||
assert(it != NULL); \
|
||||
M_C3(array_, name, _push_at)(it->array, it->index, x); \
|
||||
assert (it != NULL && a == it->array); \
|
||||
M_C3(array_, name, _push_at)(a, it->index, x); \
|
||||
} \
|
||||
\
|
||||
static inline void \
|
||||
M_C3(array_,name, _remove)(array_t a, array_it_t it) \
|
||||
{ \
|
||||
assert (a == it->array); \
|
||||
assert (it != NULL && a == it->array); \
|
||||
M_C3(array_, name, _pop_at)(NULL, a, it->index); \
|
||||
/* NOTE: it->index will naturaly point to the next element */ \
|
||||
} \
|
||||
|
||||
+1
-1
@@ -275,7 +275,7 @@ static void test_d(void)
|
||||
array_uint_it_set (it2, it);
|
||||
assert (array_uint_it_equal_p(it2, it));
|
||||
assert (*array_uint_ref(it2) == 0);
|
||||
array_uint_insert(it2, 17);
|
||||
array_uint_insert(a1, it2, 17);
|
||||
assert (array_uint_size(a1) == 300);
|
||||
|
||||
array_uint_init_set (a2, a1);
|
||||
|
||||
Reference in new issue
Block a user