diff src/fns.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 2b13858c8a2f
children 522f4ac8f10a
line wrap: on
line diff
--- a/src/fns.c	Mon Aug 17 00:48:14 2009 +0000
+++ b/src/fns.c	Mon Aug 17 01:25:54 2009 +0000
@@ -4604,8 +4604,9 @@
 
     case Lisp_Float:
       {
-	unsigned char *p = (unsigned char *) &XFLOAT_DATA (obj);
-	unsigned char *e = p + sizeof XFLOAT_DATA (obj);
+	double val = XFLOAT_DATA (obj);
+	unsigned char *p = (unsigned char *) &val;
+	unsigned char *e = p + sizeof val;
 	for (hash = 0; p < e; ++p)
 	  hash = SXHASH_COMBINE (hash, *p);
 	break;