From: Chanwoo Choi Date: Mon, 4 Jul 2016 04:27:26 +0000 (+0900) Subject: core: Add DD_LIST_SORT macro X-Git-Tag: accepted/tizen/mobile/20170328.053617~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6a7df219a9bb781f6cf6d9d324496d58e98d7ab;p=platform%2Fcore%2Fsystem%2Fpass.git core: Add DD_LIST_SORT macro This patch adds the DD_LIST_SORT macro to support the sorting. Change-Id: Id435a884e14e731b2f4bf7e96ca9bd028571aac0 Signed-off-by: Chanwoo Choi --- diff --git a/src/core/list.h b/src/core/list.h index bac4bbd..9555737 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -38,6 +38,8 @@ typedef GList dd_list; g_list_find(a, (gpointer)b) #define DD_LIST_FREE_LIST(a) \ g_list_free(a) +#define DD_LIST_SORT(a, func) \ + a = g_list_sort(a, func) #define DD_LIST_FOREACH(head, elem, node) \ for (elem = head, node = NULL; \ elem && ((node = elem->data) != NULL); \