From: Enlightenment S. <no-...@en...> - 2010-11-29 18:32:37
|
Log: * eina: eina_array_clean should be inlined from the beginning. NOTE: to prevent ABI break, I added the old symbol in eina_abi.c. So binary/library using eina_array_clean should continue to work without any problem. Author: cedric Date: 2010-11-29 10:32:30 -0800 (Mon, 29 Nov 2010) New Revision: 55068 Added: trunk/eina/src/lib/eina_abi.c Modified: trunk/eina/src/include/eina_array.h trunk/eina/src/include/eina_inline_array.x trunk/eina/src/lib/Makefile.am trunk/eina/src/lib/eina_array.c Modified: trunk/eina/src/include/eina_array.h =================================================================== --- trunk/eina/src/include/eina_array.h 2010-11-29 17:21:37 UTC (rev 55067) +++ trunk/eina/src/include/eina_array.h 2010-11-29 18:32:30 UTC (rev 55068) @@ -80,7 +80,7 @@ EAPI void eina_array_step_set(Eina_Array *array, unsigned int sizeof_eina_array, unsigned int step) EINA_ARG_NONNULL(1); -EAPI void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1); +static inline void eina_array_clean(Eina_Array *array) EINA_ARG_NONNULL(1); EAPI void eina_array_flush(Eina_Array *array) EINA_ARG_NONNULL(1); EAPI Eina_Bool eina_array_remove(Eina_Array * array, Eina_Bool (*keep)(void *data, void *gdata), Modified: trunk/eina/src/include/eina_inline_array.x =================================================================== --- trunk/eina/src/include/eina_inline_array.x 2010-11-29 17:21:37 UTC (rev 55067) +++ trunk/eina/src/include/eina_inline_array.x 2010-11-29 18:32:30 UTC (rev 55068) @@ -175,6 +175,21 @@ } /** + * @brief Clean an array. + * + * @param array The array to clean. + * + * This function sets the count member of @p array to 0. For + * performance reasons, there is no check of @p array. If it is + * @c NULL or invalid, the program may crash. + */ +static inline void +eina_array_clean(Eina_Array *array) +{ + array->count = 0; +} + +/** * @} */ Modified: trunk/eina/src/lib/Makefile.am =================================================================== --- trunk/eina/src/lib/Makefile.am 2010-11-29 17:21:37 UTC (rev 55067) +++ trunk/eina/src/lib/Makefile.am 2010-11-29 18:32:30 UTC (rev 55068) @@ -45,7 +45,8 @@ eina_unicode.c \ eina_ustrbuf.c \ eina_ustringshare.c \ -eina_value.c +eina_value.c \ +eina_abi.c if EINA_HAVE_WIN32 base_sources += eina_file_win32.c Modified: trunk/eina/src/lib/eina_array.c =================================================================== --- trunk/eina/src/lib/eina_array.c 2010-11-29 17:21:37 UTC (rev 55067) +++ trunk/eina/src/lib/eina_array.c 2010-11-29 18:32:30 UTC (rev 55068) @@ -484,24 +484,6 @@ } /** - * @brief Clean an array. - * - * @param array The array to clean. - * - * This function sets the count member of @p array to 0. For - * performance reasons, there is no check of @p array. If it is - * @c NULL or invalid, the program may crash. - */ -EAPI void -eina_array_clean(Eina_Array *array) -{ - EINA_SAFETY_ON_NULL_RETURN(array); - EINA_MAGIC_CHECK_ARRAY(array); - - array->count = 0; -} - -/** * @brief Flush an array. * * @param array The array to flush. |