On Tue, Jul 3, 2012 at 12:30 PM, Raphael Kubo da Costa
<[email protected]> wrote:
> Cedric BAIL <[email protected]> writes:
>> On Tue, Jul 3, 2012 at 12:30 AM, Raphael Kubo da Costa
>> <[email protected]> wrote:
>>> I'm unsure about whether to change the following calls, so for now I
>>> haven't:
>>>  - eina_inarray_flush()
>>>  - eina_inarray_remove()
>>>  - eina_tiler_clear()

All this function only have sense on an existing inarray or tiler as
far as I am concerned. So they are good with the current check in my
opinion.

>>>  - *_foreach():
>>>    One could argue that passing NULL should be equivalent to an empty
>>>    loop. For example, right now
>>>        eina_iterator_foreach(NULL, ..., ...)
>>>    generates a magic check error message, while
>>>        EINA_ITERATOR_FOREACH(NULL, ...)
>>>    does not.

There is valid use case for when an iterator could be NULL. If you do :
it = eina_file_stat_ls("/plop");
EINA_ITERATOR_FOREACH(it, ...)
  {
  ....
  }
eina_iterator_free(it);

It cleary simplify the code in my opinion without impacting speed at
all if we do handle it == NULL case. So for this one I would like to
have it handle.

> Thanks for reviewing. I've attached an updated patch. I've added if
> clauses to public _del() and _free() functions, and removed
> EINA_SAFETY_ON_NULL_RETURN() calls from them since they're now
> redundant. The only exception was in _eina_hash_del_by_key, where I just
> followed the style of _eina_hash_del_by_key_hash.

Sounds good to me. I will let until tomorrow before committing it, to
let more people comment on it.

> My other observations still remain, though.

Yep, here they are :-)

Thanks,
-- 
Cedric BAIL

------------------------------------------------------------------------------
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