forked from enlightenment/efl
finally addressing complaints regarding eina_list_last_data_get() not being a function. well now it is
SVN revision: 83547
This commit is contained in:
parent
f9d80e493a
commit
bfc76668f4
|
@ -64,4 +64,21 @@ eina_list_count(const Eina_List *list)
|
||||||
return list->accounting->count;
|
return list->accounting->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the last list node's data
|
||||||
|
*
|
||||||
|
* @param list The list
|
||||||
|
* @return The node's data, or @c NULL on being passed a @c NULL pointer
|
||||||
|
*
|
||||||
|
* This macro is a shortcut for typing eina_list_data_get(eina_list_last())
|
||||||
|
* @since 1.8
|
||||||
|
*/
|
||||||
|
static inline void *
|
||||||
|
eina_list_last_data_get(const Eina_List *list)
|
||||||
|
{
|
||||||
|
if (!list) return NULL;
|
||||||
|
return eina_list_data_get(eina_list_last(list));
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* EINA_LIST_INLINE_H_ */
|
#endif /* EINA_LIST_INLINE_H_ */
|
||||||
|
|
|
@ -1612,19 +1612,6 @@ EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List *list) EINA_MA
|
||||||
list = eina_list_remove_list(list, list), \
|
list = eina_list_remove_list(list, list), \
|
||||||
data = eina_list_data_get(list))
|
data = eina_list_data_get(list))
|
||||||
|
|
||||||
/**
|
|
||||||
* @def EINA_LIST_LAST_DATA_GET
|
|
||||||
* @brief Macro to return the last list node's data
|
|
||||||
*
|
|
||||||
* @param list The list
|
|
||||||
* @return The node's data, or @c NULL on being passed a @c NULL pointer
|
|
||||||
*
|
|
||||||
* This macro is a shortcut for typing eina_list_data_get(eina_list_last())
|
|
||||||
* @since 1.8
|
|
||||||
*/
|
|
||||||
#define eina_list_last_data_get(list) \
|
|
||||||
eina_list_data_get(eina_list_last(list))
|
|
||||||
|
|
||||||
#include "eina_inline_list.x"
|
#include "eina_inline_list.x"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue