Seems right but those type checking should be done in the outer function prior 
to the here internal.
acutally other ecore apis -animator, job ..- doesnt check the type but just 
null check there.
I'm just leaving it.

------------------------------------
-Regards, Hermet-

-----Original Message-----
From: "Cedric BAIL"<moa.blueb...@gmail.com> 
To: "e-devel"<enlightenment-devel@lists.sourceforge.net>; 
Cc: <g...@lists.enlightenment.org>; 
Sent: 2015-03-25 (수) 23:11:31
Subject: Re: [E-devel] [EGIT] [core/efl] master 01/01: ecore_idler: + null 
check.
 
Eo is tricky here and not obvious. You need to use eo_isa in fact as data
scope can return invalid pointer different from null...

Le 24 mars 2015 22:45, "ChunEon Park" <her...@hermet.pe.kr> a écrit :
>
> hermet pushed a commit to branch master.
>
>
http://git.enlightenment.org/core/efl.git/commit/?id=e56548aa33000561f1970abd48bfc03f05019415
>
> commit e56548aa33000561f1970abd48bfc03f05019415
> Author: ChunEon Park <chuneon.p...@samsung.com>
> Date:   Wed Mar 25 14:42:44 2015 +0900
>
>     ecore_idler: + null check.
>
>     like timer, animator we do check the idler validation
>     and prevert crash there just in user misusage case.
>
>     @fix
> ---
>  src/lib/ecore/ecore_idler.c  1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
> index 5faed54..a874717 100644
> --- a/src/lib/ecore/ecore_idler.c
> +++ b/src/lib/ecore/ecore_idler.c
> @@ -87,6 +87,7 @@ static void *
>  _ecore_idler_del(Ecore_Idler *obj)
>  {
>     Ecore_Idler_Data *idler = eo_data_scope_get(obj, MY_CLASS);
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(idler, NULL);
>     EINA_SAFETY_ON_TRUE_RETURN_VAL(idler->delete_me, NULL);
>     idler->delete_me = 1;
>     idlers_delete_me = 1;
>
> --
>
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to