On Mon, Dec 29, 2008 at 11:38 AM, Cedric BAIL <cedric.b...@free.fr> wrote:
> On Mon, Dec 29, 2008 at 2:02 PM, Gustavo Sverzut Barbieri
> <barbi...@profusion.mobi> wrote:
>> On Mon, Dec 29, 2008 at 10:41 AM, Enlightenment SVN
>> <no-re...@enlightenment.org> wrote:
>>> Log:
>>>  Don't generate warning in some little case.
>>
>> I strongly disagree with this patch. Eina Hash is not like Evas Hash,
>> by hiding this "warnings in some little case" we're hiding bugs. It's
>> better to fix those bugs and not hide these warnings.
>
>> We add these safety checks to avoid our libraries crashing badly on
>> users, not because API should really support these NULL pointers,
>> they're invalid values. It's like strlen(NULL), it does not make
>> sense.
>
> That's the typical case I want to avoid adding extra if around place
> where returning 0 would have make sense. I didn't remove all check
> only on find and population, typically used by cache system.

it's not a useless if, it's a error handling if, you must do it.

and this error checking should be done after eina_hash_new() and like,
not before these other calls, unless you can work without the hash, in
tha case you must do this special case anyway.

if people start to use few eina_hash_new() as it is supposed to be
instead of delete it when it's empty and create it before each add,
then this will be one if at the constructor and that's all.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to