2012/5/22 Cedric BAIL <[email protected]>:
> On Tue, May 22, 2012 at 12:48 PM, Christopher Michael
> <[email protected]> wrote:
>> On 05/21/12 16:34, Sebastian Dransfeld wrote:
>>> On 05/21/2012 08:24 AM, Bluezery wrote:
>>>> Hello,
>>>>
>>>> Some efreet APIs do not check input parameters.  So I add checking by
>>>> using EINA_SAFETY_ON_XXX().
>>>> ISO/IEC statndards says that "If an argument to a function has an
>>>> invalid value, behavior is undefined" . But this is  just for the
>>>> primitive functions such as libc.  I think that parameter checking is
>>>> needed in at least EFL exported APIs
>>
>> This I 150% support (Not the use of Eina, but rather the checking) !!
>> Exported APIs need to be clean....
>>
>> EFL needs lots of param checking. Has been missing for a bit of time
>> now. I try to add it as I go, but not everyone is supportive. Some do
>> see it as a "wasted variable check" ... but I would rather KNOW that the
>> stuff I am working with IS valid first, before I start to work with it
>> ;) ... If not, then what's left ? A Guess that the variable is valid ???
>> No thanks ;)
>
> Actually the EINA_SAFETY is something that could be turned off at
> build time, so the cost at runtime would be zero on a production
> build. This also means that if you use EINA_SAFETY, apps will be
> warned about there unwise usage. Prefer direct check if you want them
> to always work. I do consider that for example *_free(*) should always
> work on NULL, so better to not use EINA_SAFETY.
>  Sorry I don't have much time to check your patch now. Maybe will do next 
> week.
> --
> Cedric BAIL

Thank you for your comment.
In release time, we can also disable logging?? but if so, some
overhead is remained yet.
Currently it seems that we can only enable/disable eina safety checks in eina
Can we add another safety check mode to reduce overhead more such as
safety check without logging mode (only use if/else)?? and we can
select safety check mode when build time.
It seems that current IT trend makes release cycle more shorter
(incremental releases) and logging system may be needed after a
product is released in this case.

>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



--
BRs,
Kim.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to