On Wed, Feb 26, 2014 at 10:36 PM, WooHyun Jung <wh0705.j...@samsung.com> wrote:
> woohyun pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=6093e68cb01cf915057b9e330f7586039d092990
>
> commit 6093e68cb01cf915057b9e330f7586039d092990
> Author: WooHyun Jung <wh0705.j...@samsung.com>
> Date:   Thu Feb 27 10:31:42 2014 +0900
>
>     evas: replace EINA_LIST_FREE to EINA_LIST_FOREACH_SAFE.
>
>     EINA_LIST_FREE does eina_list_remove_list, and clip_unset does
>     the same thing to the same list pointer. So, EINA_LIST_FOREACH_SAFE
>     is proper for this case.
> ---
>  src/lib/evas/canvas/evas_object_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/evas/canvas/evas_object_main.c 
> b/src/lib/evas/canvas/evas_object_main.c
> index 9db95d4..d8d3850 100644
> --- a/src/lib/evas/canvas/evas_object_main.c
> +++ b/src/lib/evas/canvas/evas_object_main.c
> @@ -654,7 +654,7 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
> EINA_UNUSED)
>          goto end;
>       }
>     evas_object_grabs_cleanup(eo_obj, obj);
> -   EINA_LIST_FREE(obj->clip.clipees, tmp)
> +   EINA_LIST_FOREACH_SAFE(obj->clip.clipees, l, l2, tmp)
>       evas_object_clip_unset(tmp->object);

if that's the case then a saner approach is to NULL obj->clip.clipees
and then iterate the list:

l = obj->clip.clipees;
obj->clip.clipees = NULL;
EINA_LIST_FREE(l, tmp)
   evas_object_clip_unset(tmp->obj)

of course you may have to clear tmp and whatever is needed to do here as well.


the solution above is simpler and should be faster than your solution
using the foreach-safe version.

-- 
Gustavo Sverzut Barbieri
--------------------------------------
Mobile: +55 (19) 9225-2202
Contact: http://www.gustavobarbieri.com.br/contact

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to