Mercurial > emacs
diff src/dbusbind.c @ 104313:73f76307d49b
* 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.
| author | Ken Raeburn <raeburn@raeburn.org> |
|---|---|
| date | Mon, 17 Aug 2009 01:25:54 +0000 |
| parents | 52ea0b8b565e |
| children | dfa6f847adcd |
line wrap: on
line diff
--- a/src/dbusbind.c Mon Aug 17 00:48:14 2009 +0000 +++ b/src/dbusbind.c Mon Aug 17 01:25:54 2009 +0000 @@ -475,11 +475,13 @@ } 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:
