I removed this macro already and committed.
Btw, DATA_GET was already defined ... just two lines after ;-)

On 12/17/2012 04:45 PM, Tom Hacohen wrote:
> ELM_WIDGET_DATA_GET? :) Why RETURN? You are not returning out of the 
> function...
>
>
> On Mon, Dec 17, 2012 at 2:38 PM, daniel.za...@samsung.com 
> <mailto:daniel.za...@samsung.com> <daniel.za...@samsung.com 
> <mailto:daniel.za...@samsung.com>> wrote:
>
>     Hi,
>
>     You are right, it is better if it can be returned as out. This
>     macro is internal just to concentrate the eo_data_get. Before, it
>     was a little bigger because of backward compatibility. Now I think
>     we can remove it.
>
>     Anyway, if we keep it, I thought changing the name of this macro
>     to ELM_WIDGET_DATA_RETURN(). Good?
>
>     I remove the eo_isa too. We just need there the o? to avoid too
>     much prints on NULL objects.
>
>
>     On 12/17/2012 04:16 PM, Tom Hacohen wrote:
>
>         Hey Gustavo,
>
>         eo_data_get_from_type already exists, it's called eo_data_get.
>         eo_data_get
>         already handles everything that's needed to be handled and
>         already reports
>         an error when it's the wrong type.
>
>         As for this macro, it looks very bad. I would at the very
>         minimum take "wd
>         = " outside of it, as it's *very* confusing atm.
>
>         Daniel, any comments on this macro and it's usage/existence in
>         the EFL?
>
>
>
>         On Mon, Dec 17, 2012 at 2:04 PM, Gustavo Sverzut Barbieri <
>         barbi...@profusion.mobi <mailto:barbi...@profusion.mobi>> wrote:
>
>             On Mon, Dec 17, 2012 at 11:53 AM, Stefan Schmidt
>             <s.schm...@samsung.com <mailto:s.schm...@samsung.com>>
>             wrote:
>
>                 Hello.
>
>                 I'm just investigating some potential NULL
>                 dereferencing in elm_widget
>
>             and I
>
>                 wanted to get an opinion on that from Glima and maybe
>                 the EO devs.
>
>                 The root problem is this macro:
>
>                 #define ELM_WIDGET_DATA_GET_NO_INST(o, wd)     \
>                    wd = (o && eo_isa(o, ELM_OBJ_WIDGET_CLASS) ? \
>                          eo_data_get(o, ELM_OBJ_WIDGET_CLASS) : \
>                          NULL)
>
>             did not look into your patch, but i guess that the above
>             macro is so
>             common that eo should provide something like that by default:
>
>                  wd = eo_data_get_from_type(o, TYPE_CLASS);
>
>             name is open to discussion, but the ability to type check
>             and get its
>             private data is very good. It could even do the eina_log
>             and warn of
>             null pointer or wrong type, saving users some repetitive
>             code to do
>             so.
>
>             --
>             Gustavo Sverzut Barbieri
>             http://profusion.mobi embedded systems
>             --------------------------------------
>             MSN: barbi...@gmail.com <mailto:barbi...@gmail.com>
>             Skype: gsbarbieri
>             Mobile: +55 (19) 9225-2202 <tel:%2B55%20%2819%29%209225-2202>
>
>
>             
> ------------------------------------------------------------------------------
>             LogMeIn Rescue: Anywhere, Anytime Remote support for IT.
>             Free Trial
>             Remotely access PCs and mobile devices and provide instant
>             support
>             Improve your efficiency, and focus on delivering more
>             value-add services
>             Discover what IT Professionals Know. Rescue delivers
>             http://p.sf.net/sfu/logmein_12329d2d
>             _______________________________________________
>             enlightenment-devel mailing list
>             enlightenment-devel@lists.sourceforge.net
>             <mailto:enlightenment-devel@lists.sourceforge.net>
>             https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
>
>
>
>
>
> -- 
> Tom.
>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to