forked from enlightenment/efl
eina_array: interpret the count of a NULL array as 0
this makes the usage way more convinient. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D11373
This commit is contained in:
parent
9442598768
commit
6c251b2d01
|
@ -89,6 +89,7 @@ eina_array_count_get(const Eina_Array *array)
|
|||
static inline unsigned int
|
||||
eina_array_count(const Eina_Array *array)
|
||||
{
|
||||
if (!array) return 0;
|
||||
return array->count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue