diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 4 | ||||
-rw-r--r-- | e-util/e-url.c | 14 |
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 (¶ms, 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; } |