summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-01-24 09:33:17 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-01-24 09:33:17 +0000
commit4b4bdbf1af79307c7a53db42abbb13e0af38c3cb (patch)
tree1fc6d8f2c1721918b56d8982f7c34c4e04839aaa
parent66633a4d9536b6c4f8ef4af22b359ea255603d6c (diff)
downloadlasso-4b4bdbf1af79307c7a53db42abbb13e0af38c3cb.tar.gz
lasso-4b4bdbf1af79307c7a53db42abbb13e0af38c3cb.tar.xz
lasso-4b4bdbf1af79307c7a53db42abbb13e0af38c3cb.zip
Core: new macros for adding string to GList
* lasso/utils.h: - lasso_list_add_string, add a copy of a string to a GList
-rw-r--r--lasso/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lasso/utils.h b/lasso/utils.h
index e3cc1e16..be7f9382 100644
--- a/lasso/utils.h
+++ b/lasso/utils.h
@@ -64,6 +64,11 @@
dest = xmlCopyNode(src, 1); \
}
+#define lasso_list_add_string(dest, src) \
+ { \
+ (dest) = g_list_append((dest), g_strdup(src));\
+ }
+
#define lasso_list_add_gobject(dest, src) \
{ \
dest = g_list_append(dest, g_object_ref(src)); \