diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-04-22 00:44:22 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-04-22 00:44:22 +0000 |
| commit | 34c7642226adcc643aee7bc164013d07e5780f3f (patch) | |
| tree | 00a1de5efad25e6ade69b2b1a1de4e798e25e2a5 | |
| parent | f08387c983eb18fd43ff216d19b7ecdfd54c4e5b (diff) | |
Utils: add lasso_assign_list
| -rw-r--r-- | lasso/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lasso/utils.h b/lasso/utils.h index 3b28497b..8eb744f1 100644 --- a/lasso/utils.h +++ b/lasso/utils.h @@ -247,6 +247,14 @@ dest = __tmp; \ } +#define lasso_assign_list(dest, src) \ + { \ + GList **__tmp = &(dest); \ + if (*__tmp) \ + g_list_free(*__tmp); \ + *__tmp = g_list_copy((src)); \ + } + #define lasso_assign_new_list_of_gobjects(dest, src) \ { \ GList *__tmp = (src); \ |
