dbus/glib dbus-gvalue.c,1.3,1.4
Havoc Pennington
hp@freedesktop.org
Mon Jan 17 11:49:54 PST 2005
Update of /cvs/dbus/dbus/glib
In directory gabe:/tmp/cvs-serv16881/glib
Modified Files:
dbus-gvalue.c
Log Message:
2005-01-17 Havoc Pennington <hp@redhat.com>
* dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
* Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
of an 8-bit type. Now dbus_bool_t is the type to use whenever you
are marshaling/unmarshaling a boolean.
Index: dbus-gvalue.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gvalue.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dbus-gvalue.c 15 Jan 2005 07:15:38 -0000 1.3
+++ dbus-gvalue.c 17 Jan 2005 19:49:52 -0000 1.4
@@ -34,6 +34,8 @@
g_value_init (value, G_TYPE_##g_t); \
dbus_message_iter_get_basic (iter, &value->data[0]); \
break
+
+ g_assert (sizeof (dbus_bool_t) == sizeof (value->data[0].v_int));
switch (dbus_message_iter_get_arg_type (iter))
{
@@ -98,7 +100,7 @@
break;
case G_TYPE_BOOLEAN:
{
- unsigned char b = g_value_get_boolean (value);
+ dbus_bool_t b = g_value_get_boolean (value);
if (!dbus_message_iter_append_basic (iter,
DBUS_TYPE_BOOLEAN,
&b))
More information about the dbus-commit
mailing list