diff --git a/variant-iter.patch b/variant-iter.patch index 5b1a5ee..1d7bd5d 100644 --- a/variant-iter.patch +++ b/variant-iter.patch @@ -1,26 +1,48 @@ diff -up colord-0.1.16/libcolord/cd-device.c.iter colord-0.1.16/libcolord/cd-device.c --- colord-0.1.16/libcolord/cd-device.c.iter 2012-01-20 12:54:20.620011834 -0500 -+++ colord-0.1.16/libcolord/cd-device.c 2012-01-20 12:54:32.586012014 -0500 -@@ -472,8 +472,7 @@ cd_device_set_metadata_from_variant (CdD ++++ colord-0.1.16/libcolord/cd-device.c 2012-01-20 13:15:12.164030613 -0500 +@@ -464,7 +464,7 @@ cd_device_get_metadata_item (CdDevice *d + static void + cd_device_set_metadata_from_variant (CdDevice *device, GVariant *variant) + { +- GVariantIter *iter = NULL; ++ GVariantIter iter; + const gchar *prop_key; + const gchar *prop_value; + +@@ -472,9 +472,8 @@ cd_device_set_metadata_from_variant (CdD g_hash_table_remove_all (device->priv->metadata); /* insert the new metadata */ - g_variant_get (variant, "a{ss}", - &iter); +- while (g_variant_iter_loop (iter, "{ss}", + g_variant_iter_init (&iter, variant); - while (g_variant_iter_loop (iter, "{ss}", ++ while (g_variant_iter_loop (&iter, "{ss}", &prop_key, &prop_value)) { g_hash_table_insert (device->priv->metadata, + g_strdup (prop_key), diff -up colord-0.1.16/libcolord/cd-profile.c.iter colord-0.1.16/libcolord/cd-profile.c --- colord-0.1.16/libcolord/cd-profile.c.iter 2011-09-13 07:38:56.000000000 -0400 -+++ colord-0.1.16/libcolord/cd-profile.c 2012-01-20 12:54:02.525011562 -0500 -@@ -440,8 +440,7 @@ cd_profile_set_metadata_from_variant (Cd ++++ colord-0.1.16/libcolord/cd-profile.c 2012-01-20 13:15:15.379030662 -0500 +@@ -432,7 +432,7 @@ cd_profile_get_metadata_item (CdProfile + static void + cd_profile_set_metadata_from_variant (CdProfile *profile, GVariant *variant) + { +- GVariantIter *iter = NULL; ++ GVariantIter iter; + const gchar *prop_key; + const gchar *prop_value; + +@@ -440,9 +440,8 @@ cd_profile_set_metadata_from_variant (Cd g_hash_table_remove_all (profile->priv->metadata); /* insert the new metadata */ - g_variant_get (variant, "a{ss}", - &iter); +- while (g_variant_iter_loop (iter, "{ss}", + g_variant_iter_init (&iter, variant); - while (g_variant_iter_loop (iter, "{ss}", ++ while (g_variant_iter_loop (&iter, "{ss}", &prop_key, &prop_value)) { g_hash_table_insert (profile->priv->metadata, + g_strdup (prop_key),