e-tizen-testcase: remove miscopied function and add EINA_CAST_FOREACH_SAFE 44/182544/1
authorJunSeok, Kim <juns.kim@samsung.com>
Tue, 26 Jun 2018 05:32:35 +0000 (14:32 +0900)
committerJunSeok, Kim <juns.kim@samsung.com>
Tue, 26 Jun 2018 05:32:35 +0000 (14:32 +0900)
Change-Id: I3047cdb66fc0beeb0c5d08947bc6297cdd0f1eca

src/eina_list_ext.h

index 216747a..9798508 100644 (file)
        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),                              \