[telepathy-glib/master] tests/lib/params-cm.h: allocate enough storage for the D-Bus representation of int16/int32

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jun 25 11:07:08 PDT 2009


Even though the D-Bus types are 16 and 32 bits respectively, we store them
in the struct as gint/guint, following the usual dbus-glib convention.

On architectures like i386 that pad 16-bit struct members to 32 bits
and are little-endian, we happen to get away with it, but on powerpc we don't.

Reviewed-by: Will Thompson <will.thompson at collabora.co.uk>
---
 tests/lib/params-cm.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/lib/params-cm.h b/tests/lib/params-cm.h
index 3802bb2..e21b186 100644
--- a/tests/lib/params-cm.h
+++ b/tests/lib/params-cm.h
@@ -70,10 +70,10 @@ GType param_connection_manager_get_type (void);
 
 typedef struct {
     gchar *a_string;
-    gint16 a_int16;
-    gint32 a_int32;
-    guint16 a_uint16;
-    guint32 a_uint32;
+    gint a_int16;
+    gint a_int32;
+    guint a_uint16;
+    guint a_uint32;
     gint64 a_int64;
     guint64 a_uint64;
     gboolean a_boolean;
-- 
1.5.6.5



More information about the telepathy-commits mailing list