aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorKen Raeburn <[email protected]>2009-08-17 01:25:54 +0000
committerKen Raeburn <[email protected]>2009-08-17 01:25:54 +0000
commitf601cdf35d3e76ffc4927ea35e0f82e72b1ba37f (patch)
tree2d9f05c4ba9510645a5cf87741c13ab37a4d16e1 /src/dbusbind.c
parent4230ab74b7bec1bc05801d91117f133efe88df25 (diff)
* lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.
(XFLOAT_INIT): New macro for storing a float value. * alloc.c (make_float, make_pure_float): Use XFLOAT_INIT. * fns.c (sxhash): Copy out the value of a float in order to examine its bytes. * dbusbind.c (xd_append_arg): Likewise.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index a38a994400..76b0da5420 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -475,11 +475,13 @@ xd_append_arg (dtype, object, iter)
}
case DBUS_TYPE_DOUBLE:
- XD_DEBUG_MESSAGE ("%c %f", dtype, XFLOAT_DATA (object));
- if (!dbus_message_iter_append_basic (iter, dtype,
- &XFLOAT_DATA (object)))
- XD_SIGNAL2 (build_string ("Unable to append argument"), object);
- return;
+ {
+ double val = XFLOAT_DATA (object);
+ XD_DEBUG_MESSAGE ("%c %f", dtype, val);
+ if (!dbus_message_iter_append_basic (iter, dtype, &val))
+ XD_SIGNAL2 (build_string ("Unable to append argument"), object);
+ return;
+ }
case DBUS_TYPE_STRING:
case DBUS_TYPE_OBJECT_PATH: