aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-11-12 09:58:48 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-11-12 09:58:48 +0000
commit7ba993749d8b6eaaf4ddba9b2d5fae675d325429 (patch)
tree3c0a79faaec95d48706380a5bb729060c1509b94
parent0bbec07e6960fb568fdb60b10b0e1eab4cf63d00 (diff)
downloadefl-7ba993749d8b6eaaf4ddba9b2d5fae675d325429.tar.gz
efl-7ba993749d8b6eaaf4ddba9b2d5fae675d325429.tar.xz
efl-7ba993749d8b6eaaf4ddba9b2d5fae675d325429.zip
add eina_list_last_data_get() macro to simplify calling eina_list_data_get(eina_list_last())
SVN revision: 79142
-rw-r--r--ChangeLog4
-rw-r--r--NEWS7
-rw-r--r--src/lib/eina/eina_list.h12
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index af4fdcfa6..1ad7e0bb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,3 +65,7 @@
2012-11-10 Vincent Torri
* Fix build of eina_file on Solaris 10
+
+2012-11-12 Mike Blumenkrantz
+
+ * Add eina_list_last_data_get
diff --git a/NEWS b/NEWS
index 7cb661bfe..1e6e1081c 100644
--- a/NEWS
+++ b/NEWS
@@ -10,14 +10,15 @@ Additions:
* Add eina_barrier thread API
* Add eina_tmpstr_add() and eina_tmpstr_del()
* Add eina_thread API
+ * Add eina_list_last_data_get
Improvements:
- * Single EFL tree now covring all EFL library components.
+ * Single EFL tree covering all EFL library components.
* Speedup Eina Rbtree Iterator by recycling memory instead of
- massively calling malloc/free.
+ repeatedly calling malloc/free.
* Display more information with eet -l -v.
Fixes:
* Fix PPC (big endian) image codec bug.
* Fix return value of eina_mmap_safety_enabled_set() and future
- eina_mmap_safety_enabled_get() returns after success
+ eina_mmap_safety_enabled_get() returns after success
diff --git a/src/lib/eina/eina_list.h b/src/lib/eina/eina_list.h
index a81f57b80..2e62e4f90 100644
--- a/src/lib/eina/eina_list.h
+++ b/src/lib/eina/eina_list.h
@@ -1612,6 +1612,18 @@ EAPI Eina_Accessor *eina_list_accessor_new(const Eina_List *list) EINA_MA
list = eina_list_remove_list(list, 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())
+ */
+#define eina_list_last_data_get(list) \
+ eina_list_data_get(eina_list_last(list))
+
#include "eina_inline_list.x"
/**