From: Dale Whittaker Date: Sat, 25 Apr 2009 14:01:28 +0000 (+0200) Subject: Implement katze_strv_assign X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffd58a06a8f05c9eca108ad7950882f1c4171003;p=midori Implement katze_strv_assign --- 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,