summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-17 13:55:33 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-19 16:28:08 +0100
commit6c251b2d0163a19f4928c3388fb8e675d8f00bdc (patch)
tree588855a847d3f8f5015653d98616924cc2af9ac0
parent94425987688b8c95249984d0328cd857c466361e (diff)
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
-rw-r--r--src/lib/eina/eina_inline_array.x1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x
index d750782ce8..8367d61e7b 100644
--- a/src/lib/eina/eina_inline_array.x
+++ b/src/lib/eina/eina_inline_array.x
@@ -89,6 +89,7 @@ eina_array_count_get(const Eina_Array *array)
89static inline unsigned int 89static inline unsigned int
90eina_array_count(const Eina_Array *array) 90eina_array_count(const Eina_Array *array)
91{ 91{
92 if (!array) return 0;
92 return array->count; 93 return array->count;
93} 94}
94 95