From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/eina/src/include/eina_inline_array.x | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libraries/eina/src/include/eina_inline_array.x') 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 @@ #ifndef EINA_INLINE_ARRAY_X_ #define EINA_INLINE_ARRAY_X_ +#include + #include /** @@ -126,6 +128,8 @@ eina_array_data_set(const Eina_Array *array, unsigned int idx, const void *data) * This function returns the number of elements in @p array. For * performance reasons, there is no check of @p array. If it is * @c NULL or invalid, the program may crash. + * + * @deprecated use eina_array_count() */ static inline unsigned int eina_array_count_get(const Eina_Array *array) @@ -133,6 +137,22 @@ eina_array_count_get(const Eina_Array *array) return array->count; } +/** + * @brief Return the number of elements in an array. + * + * @param array The array. + * @return The number of elements. + * + * This function returns the number of elements in @p array. For + * performance reasons, there is no check of @p array. If it is + * @c NULL or invalid, the program may crash. + */ +static inline unsigned int +eina_array_count(const Eina_Array *array) +{ + return array->count; +} + static inline Eina_Bool eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata) { -- cgit v1.1