aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorKen Raeburn2009-08-17 01:25:54 +0000
committerKen Raeburn2009-08-17 01:25:54 +0000
commitf601cdf35d3e76ffc4927ea35e0f82e72b1ba37f (patch)
tree2d9f05c4ba9510645a5cf87741c13ab37a4d16e1 /src/fns.c
parent4230ab74b7bec1bc05801d91117f133efe88df25 (diff)
downloademacs-f601cdf35d3e76ffc4927ea35e0f82e72b1ba37f.tar.gz
emacs-f601cdf35d3e76ffc4927ea35e0f82e72b1ba37f.zip
* 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/fns.c')
-rw-r--r--src/fns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index 61abf32138d..562d493b59c 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4604,8 +4604,9 @@ sxhash (obj, depth)
4604 4604
4605 case Lisp_Float: 4605 case Lisp_Float:
4606 { 4606 {
4607 unsigned char *p = (unsigned char *) &XFLOAT_DATA (obj); 4607 double val = XFLOAT_DATA (obj);
4608 unsigned char *e = p + sizeof XFLOAT_DATA (obj); 4608 unsigned char *p = (unsigned char *) &val;
4609 unsigned char *e = p + sizeof val;
4609 for (hash = 0; p < e; ++p) 4610 for (hash = 0; p < e; ++p)
4610 hash = SXHASH_COMBINE (hash, *p); 4611 hash = SXHASH_COMBINE (hash, *p);
4611 break; 4612 break;