EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list);
EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list);
-#define EINA_INLIST_ITER_NEXT(list, l) for (l = (void*)list; l; l = (void*)(l->__in_list.next))
-#define EINA_INLIST_ITER_LAST(list, l) for (l = (void*)(list->last); l; l = (void*)(l->__in_list.prev))
+#define EINA_INLIST_FOREACH(list, l) for (l = (void*)list; l; l = (void*)(l->__in_list.next))
+#define EINA_INLIST_REVERSE_FOREACH(list, l) for (l = (void*)(list->last); l; l = (void*)(l->__in_list.prev))
/** @} */
"set ylabel \"time\"\n"
"plot ", bench->name, bench->run, bench->name, bench->run);
- EINA_INLIST_ITER_NEXT(bench->runs, run)
+ EINA_INLIST_FOREACH(bench->runs, run)
{
Eina_Counter *counter;
int i;
fprintf(out, "# specimen\texperiment time\tstarting time\tending time\n");
- EINA_INLIST_ITER_LAST(counter->clocks, clk)
+ EINA_INLIST_REVERSE_FOREACH(counter->clocks, clk)
{
long int start;
long int end;
{
Eina_Magic_String *ems;
- EINA_INLIST_ITER_NEXT(strings, ems)
+ EINA_INLIST_FOREACH(strings, ems)
if (ems->magic == magic)
return ems->string;
{
Eina_Magic_String *ems;
- EINA_INLIST_ITER_NEXT(strings, ems)
+ EINA_INLIST_FOREACH(strings, ems)
if (ems->magic == magic)
{
free(ems->string);
void *mem;
// look 4 pool from 2nd bucket on
- EINA_INLIST_ITER_NEXT(pool->first, p)
+ EINA_INLIST_FOREACH(pool->first, p)
{
// base is not NULL - has a free slot
if (p->base)
psize = item_alloc * pool->pool_size;
// look 4 pool
- EINA_INLIST_ITER_NEXT(pool->first, p)
+ EINA_INLIST_FOREACH(pool->first, p)
{
// pool mem base
pmem = (void *)(((unsigned char *)p) + sizeof(Chained_Pool));
}
}
- EINA_INLIST_ITER_NEXT(head, ebo)
+ EINA_INLIST_FOREACH(head, ebo)
ebo->keep = rand() < (RAND_MAX / 2) ? ebo->keep : EINA_FALSE;
}
tmp = _eina_test_inlist_build(81);
lst = eina_inlist_append_relative(lst, EINA_INLIST_GET(tmp), NULL);
- EINA_INLIST_ITER_NEXT(lst, tmp)
+ EINA_INLIST_FOREACH(lst, tmp)
{
switch (i)
{