Implement IT_END operator.

Add missing IT_LAST operator
This commit is contained in:
Patrick Pelissier committed 2017-03-13 10:32:57 +01:00
1 parent c09ce9c949
commit eaf3af8c07
6 files changed
+94

No files matched your search

+20
View File
@@ -60,6 +60,8 @@
,SUBTYPE(M_C3(array_type_,name,_t)) \
,IT_TYPE(M_C3(array_it_,name,_t)) \
,IT_FIRST(M_C3(array_,name,_it)) \
,IT_LAST(M_C3(array_,name,_it_last)) \
,IT_END(M_C3(array_,name,_it_end)) \
,IT_SET(M_C3(array_,name,_it_set)) \
,IT_END_P(M_C3(array_,name,_end_p)) \
,IT_LAST_P(M_C3(array_,name,_last_p)) \
@@ -466,6 +468,24 @@
it->array = v; \
} \
\
static inline void \
M_C3(array_, name, _it_last)(M_C3(array_it_,name,_t) it, \
M_C3(array_, name, _t) v) \
{ \
assert (it != NULL && v != NULL); \
it->index = v->size - 1; \
it->array = v; \
} \
\
static inline void \
M_C3(array_, name, _it_end)(M_C3(array_it_,name,_t) it, \
M_C3(array_, name, _t) v) \
{ \
assert (it != NULL && v != NULL); \
it->index = v->size; \
it->array = v; \
} \
\
static inline void \
M_C3(array_, name, _it_set)(M_C3(array_it_,name,_t) it, \
const M_C3(array_it_, name, _t) org) \