diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/src/include/eina_inline_array.x | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/eina/src/include/eina_inline_array.x b/libraries/eina/src/include/eina_inline_array.x index f9f6026..a635ee2 100644 --- a/libraries/eina/src/include/eina_inline_array.x +++ b/libraries/eina/src/include/eina_inline_array.x | |||
@@ -19,6 +19,8 @@ | |||
19 | #ifndef EINA_INLINE_ARRAY_X_ | 19 | #ifndef EINA_INLINE_ARRAY_X_ |
20 | #define EINA_INLINE_ARRAY_X_ | 20 | #define EINA_INLINE_ARRAY_X_ |
21 | 21 | ||
22 | #include <stddef.h> | ||
23 | |||
22 | #include <stdio.h> | 24 | #include <stdio.h> |
23 | 25 | ||
24 | /** | 26 | /** |
@@ -126,6 +128,8 @@ eina_array_data_set(const Eina_Array *array, unsigned int idx, const void *data) | |||
126 | * This function returns the number of elements in @p array. For | 128 | * This function returns the number of elements in @p array. For |
127 | * performance reasons, there is no check of @p array. If it is | 129 | * performance reasons, there is no check of @p array. If it is |
128 | * @c NULL or invalid, the program may crash. | 130 | * @c NULL or invalid, the program may crash. |
131 | * | ||
132 | * @deprecated use eina_array_count() | ||
129 | */ | 133 | */ |
130 | static inline unsigned int | 134 | static inline unsigned int |
131 | eina_array_count_get(const Eina_Array *array) | 135 | eina_array_count_get(const Eina_Array *array) |
@@ -133,6 +137,22 @@ eina_array_count_get(const Eina_Array *array) | |||
133 | return array->count; | 137 | return array->count; |
134 | } | 138 | } |
135 | 139 | ||
140 | /** | ||
141 | * @brief Return the number of elements in an array. | ||
142 | * | ||
143 | * @param array The array. | ||
144 | * @return The number of elements. | ||
145 | * | ||
146 | * This function returns the number of elements in @p array. For | ||
147 | * performance reasons, there is no check of @p array. If it is | ||
148 | * @c NULL or invalid, the program may crash. | ||
149 | */ | ||
150 | static inline unsigned int | ||
151 | eina_array_count(const Eina_Array *array) | ||
152 | { | ||
153 | return array->count; | ||
154 | } | ||
155 | |||
136 | static inline Eina_Bool | 156 | static inline Eina_Bool |
137 | eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata) | 157 | eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata) |
138 | { | 158 | { |