aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-10-02 22:50:59 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-10-02 22:50:59 +0800
commit2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7 (patch)
tree85a74026bdb475cb176a7e9ee9b5a1e0eaccc865 /e-util
parent82ca0883f72b38604a914bc6bd0689f530b1e0a1 (diff)
downloadgsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar.gz
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar.bz2
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar.lz
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar.xz
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.tar.zst
gsoc2013-evolution-2bef0f376dcc2f1fe4aad04e0aae46b8d0d531a7.zip
duplicate also the params member
2001-10-02 Rodrigo Moya <rodrigo@ximian.com> * e-url.c (e_uri_copy): duplicate also the params member svn path=/trunk/; revision=13303
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog4
-rw-r--r--e-util/e-url.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index c0d8ffd630..e11691a740 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,9 @@
2001-10-02 Rodrigo Moya <rodrigo@ximian.com>
+ * e-url.c (e_uri_copy): duplicate also the params member
+
+2001-10-02 Rodrigo Moya <rodrigo@ximian.com>
+
* e-url.[ch] (e_uri_copy, e_uri_to_string): new functions
2001-10-01 Rodrigo Moya <rodrigo@ximian.com>
diff --git a/e-util/e-url.c b/e-util/e-url.c
index 9928aeca66..496cd87981 100644
--- a/e-util/e-url.c
+++ b/e-util/e-url.c
@@ -263,6 +263,14 @@ e_uri_get_param (EUri *uri, const char *name)
return g_datalist_get_data (&uri->params, name);
}
+static void
+copy_param_cb (GQuark key_id, gpointer data, gpointer user_data)
+{
+ GData *params = (GData *) user_data;
+
+ g_datalist_id_set_data_full (&params, key_id, g_strdup (data), g_free);
+}
+
EUri *
e_uri_copy (EUri *uri)
{
@@ -280,7 +288,11 @@ e_uri_copy (EUri *uri)
uri_copy->path = g_strdup (uri->path);
uri_copy->query = g_strdup (uri->query);
uri_copy->fragment = g_strdup (uri->fragment);
- /* FIXME: copy uri->params */
+
+ /* copy uri->params */
+ g_datalist_foreach (&uri->params,
+ (GDataForeachFunc) copy_param_cb,
+ &uri_copy->params);
return uri_copy;
}