From ffd58a06a8f05c9eca108ad7950882f1c4171003 Mon Sep 17 00:00:00 2001 From: Dale Whittaker Date: Sat, 25 Apr 2009 16:01:28 +0200 Subject: [PATCH] Implement katze_strv_assign --- katze/katze-utils.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/katze/katze-utils.h b/katze/katze-utils.h index f5f73b6c..77c104e4 100644 --- a/katze/katze-utils.h +++ b/katze/katze-utils.h @@ -1,5 +1,6 @@ /* Copyright (C) 2007-2008 Christian Dywan + Copyright (C) 2009 Dale Whittaker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -54,6 +55,22 @@ G_BEGIN_DECLS lvalue = rvalue; \ } +/** + * katze_strv_assign: + * @lvalue: a string list + * @rvalue: the new value + * + * Frees @lvalue if needed and assigns it the value of @rvalue. + * + * Since: 0.1.7 + **/ +#define katze_strv_assign(lvalue, rvalue) \ + if (1) \ + { \ + g_strfreev (lvalue); \ + lvalue = rvalue; \ + } + GtkWidget* katze_property_proxy (gpointer object, const gchar* property,