[Telepathy-commits] [telepathy-gabble/master] conn-location: remove suspicious GArray assumptions

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Feb 24 04:23:41 PST 2009


What dbus-glib wants is precisely a GArray of guint, so give it one of
those. A GArray of an enum is not necessarily the same thing
(in practice, we tend to assume that enums are the same size as ints,
but ISO C does not guarantee this).
---
 src/conn-location.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conn-location.c b/src/conn-location.c
index 7be87c6..36f985b 100644
--- a/src/conn-location.c
+++ b/src/conn-location.c
@@ -196,10 +196,10 @@ conn_location_properties_getter (GObject *object,
 {
   if (!tp_strdiff (g_quark_to_string (name), "LocationAccessControlTypes"))
     {
-      TpRichPresenceAccessControlType access_control_type =
+      guint access_control_type =
         TP_RICH_PRESENCE_ACCESS_CONTROL_TYPE_PUBLISH_LIST;
       GArray *access_control = g_array_sized_new (FALSE, FALSE,
-          sizeof (TpRichPresenceAccessControlType), 1);
+          sizeof (guint), 1);
 
       g_array_append_val (access_control, access_control_type);
       g_value_take_boxed (value, access_control);
-- 
1.5.6.5




More information about the telepathy-commits mailing list