diff options
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-gobject.c | 4 | ||||
-rw-r--r-- | dbus/dbus-gproxy.c | 6 | ||||
-rw-r--r-- | dbus/dbus-gsignature.c | 2 | ||||
-rw-r--r-- | dbus/dbus-gtype-specialized.c | 2 | ||||
-rw-r--r-- | dbus/dbus-gvalue-parse-variant.c | 13 |
5 files changed, 20 insertions, 7 deletions
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index bac91be..bdce16b 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -1732,7 +1732,7 @@ invoke_object_method (GObject *object, types_array = _dbus_gtypes_from_arg_signature (in_signature, FALSE); n_params = types_array->len; - types = (const GType*) types_array->data; + types = (const GType*)(void *) types_array->data; value_array = _dbus_gvalue_demarshal_message (&context, message, n_params, types, &error); if (value_array == NULL) @@ -3065,7 +3065,7 @@ dbus_g_object_register_marshaller (GClosureMarshal marshaller, g_array_append_val (types, gtype); dbus_g_object_register_marshaller_array (marshaller, rettype, - types->len, (GType*) types->data); + types->len, (GType*)(void *) types->data); g_array_free (types, TRUE); va_end (args); diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c index c3ae9ec..52c8db9 100644 --- a/dbus/dbus-gproxy.c +++ b/dbus/dbus-gproxy.c @@ -1711,7 +1711,7 @@ marshal_dbus_message_to_g_marshaller (GClosure *closure, priv = DBUS_G_PROXY_GET_PRIVATE(proxy); c_marshaller = _dbus_gobject_lookup_marshaller (G_TYPE_NONE, gsignature->len, - (GType*) gsignature->data); + (GType*)(void *) gsignature->data); g_return_if_fail (c_marshaller != NULL); @@ -1721,7 +1721,7 @@ marshal_dbus_message_to_g_marshaller (GClosure *closure, context.gconnection = DBUS_G_CONNECTION_FROM_CONNECTION (priv->manager->connection); context.proxy = proxy; - types = (const GType*) gsignature->data; + types = (const GType*)(void *) gsignature->data; value_array = _dbus_gvalue_demarshal_message (&context, message, gsignature->len, types, NULL); } @@ -3046,7 +3046,7 @@ dbus_g_proxy_add_signal (DBusGProxy *proxy, va_end (args); #ifndef G_DISABLE_CHECKS - if (_dbus_gobject_lookup_marshaller (G_TYPE_NONE, gtypesig->len, (const GType*) gtypesig->data) == NULL) + if (_dbus_gobject_lookup_marshaller (G_TYPE_NONE, gtypesig->len, (const GType*)(void *) gtypesig->data) == NULL) g_warning ("No marshaller for signature of signal '%s'", signal_name); #endif diff --git a/dbus/dbus-gsignature.c b/dbus/dbus-gsignature.c index 46c9205..63cce0b 100644 --- a/dbus/dbus-gsignature.c +++ b/dbus/dbus-gsignature.c @@ -131,7 +131,7 @@ signature_iter_to_g_type_struct (DBusSignatureIter *iter, gboolean is_client) } while (dbus_signature_iter_next (iter)); - ret = dbus_g_type_get_structv ("GValueArray", types->len, (GType*) types->data); + ret = dbus_g_type_get_structv ("GValueArray", types->len, (GType*)(void *) types->data); g_array_free (types, TRUE); return ret; } diff --git a/dbus/dbus-gtype-specialized.c b/dbus/dbus-gtype-specialized.c index bb1faf4..cfef797 100644 --- a/dbus/dbus-gtype-specialized.c +++ b/dbus/dbus-gtype-specialized.c @@ -867,7 +867,7 @@ dbus_g_type_get_struct (const char *container, va_end (args); ret = lookup_or_register_specialized (container, types->len, - (GType *) types->data); + (GType *)(void *) types->data); g_array_free (types, TRUE); diff --git a/dbus/dbus-gvalue-parse-variant.c b/dbus/dbus-gvalue-parse-variant.c index 52c5f5b..9a2adfb 100644 --- a/dbus/dbus-gvalue-parse-variant.c +++ b/dbus/dbus-gvalue-parse-variant.c @@ -198,6 +198,11 @@ dbus_g_value_basic_array_parse_variant (GVariant *variant, dg_size = gv_size = sizeof (guint64); break; + case G_VARIANT_CLASS_FLOAT: + gtype = G_TYPE_FLOAT; + dg_size = gv_size = sizeof (gfloat); + break; + case G_VARIANT_CLASS_DOUBLE: gtype = G_TYPE_DOUBLE; dg_size = gv_size = sizeof (gdouble); @@ -459,6 +464,14 @@ dbus_g_value_parse_variant_by_type (GVariant *variant, break; + case G_VARIANT_CLASS_FLOAT: + g_value_init (value, G_TYPE_FLOAT); + + if (variant != NULL) + g_value_set_float (value, g_variant_get_float (variant)); + + break; + case G_VARIANT_CLASS_DOUBLE: g_value_init (value, G_TYPE_DOUBLE); |