l = eina_list_next(l), \
data = (caster) eina_list_data_get(l))
-#define EINA_LIST_CAST_REVERSE_FOREACH(list, l, data, caster) \
- for (l = eina_list_last(list), \
- data = (caster)eina_list_data_get(l); \
- l; \
- l = eina_list_prev(l), \
- data = (caster)eina_list_data_get(l))
+#define EINA_LIST_CAST_FOREACH_SAFE(list, l, l_next, data, caster) \
+ for (l = list, \
+ l_next = eina_list_next(l), \
+ EINA_PREFETCH(l_next), \
+ data = (caster)eina_list_data_get(l); \
+ EINA_PREFETCH(data), \
+ l; \
+ l = l_next, \
+ l_next = eina_list_prev(l), \
+ EINA_PREFETCH(l_next), \
+ data = (caster)eina_list_data_get(l), \
+ EINA_PREFETCH(data))
#define EINA_LIST_CAST_REVERSE_FOREACH(list, l, data, caster) \
for (l = eina_list_last(list), \