[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog alloc.c dbusbind.c fns.c li...
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] emacs/src ChangeLog alloc.c dbusbind.c fns.c li... |
Date: |
Mon, 17 Aug 2009 01:25:59 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Ken Raeburn <raeburn> 09/08/17 01:25:58
Modified files:
src : ChangeLog alloc.c dbusbind.c fns.c lisp.h
Log message:
* 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.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7692&r2=1.7693
http://cvs.savannah.gnu.org/viewcvs/emacs/src/alloc.c?cvsroot=emacs&r1=1.447&r2=1.448
http://cvs.savannah.gnu.org/viewcvs/emacs/src/dbusbind.c?cvsroot=emacs&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fns.c?cvsroot=emacs&r1=1.458&r2=1.459
http://cvs.savannah.gnu.org/viewcvs/emacs/src/lisp.h?cvsroot=emacs&r1=1.660&r2=1.661
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7692
retrieving revision 1.7693
diff -u -b -r1.7692 -r1.7693
--- ChangeLog 17 Aug 2009 00:48:14 -0000 1.7692
+++ ChangeLog 17 Aug 2009 01:25:54 -0000 1.7693
@@ -1,5 +1,13 @@
2009-08-17 Ken Raeburn <address@hidden>
+ * 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.
+
* emacs.c (main): Don't call syms_of_data twice.
2009-08-16 Michael Albinus <address@hidden>
Index: alloc.c
===================================================================
RCS file: /sources/emacs/emacs/src/alloc.c,v
retrieving revision 1.447
retrieving revision 1.448
diff -u -b -r1.447 -r1.448
--- alloc.c 30 Jan 2009 23:43:21 -0000 1.447
+++ alloc.c 17 Aug 2009 01:25:58 -0000 1.448
@@ -2643,7 +2643,7 @@
MALLOC_UNBLOCK_INPUT;
- XFLOAT_DATA (val) = float_value;
+ XFLOAT_INIT (val, float_value);
eassert (!FLOAT_MARKED_P (XFLOAT (val)));
consing_since_gc += sizeof (struct Lisp_Float);
floats_consed++;
@@ -4850,7 +4850,7 @@
p = (struct Lisp_Float *) pure_alloc (sizeof *p, Lisp_Float);
XSETFLOAT (new, p);
- XFLOAT_DATA (new) = num;
+ XFLOAT_INIT (new, num);
return new;
}
Index: dbusbind.c
===================================================================
RCS file: /sources/emacs/emacs/src/dbusbind.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- dbusbind.c 16 Aug 2009 17:34:47 -0000 1.42
+++ dbusbind.c 17 Aug 2009 01:25:58 -0000 1.43
@@ -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)))
+ {
+ 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:
Index: fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/fns.c,v
retrieving revision 1.458
retrieving revision 1.459
diff -u -b -r1.458 -r1.459
--- fns.c 10 Aug 2009 00:57:48 -0000 1.458
+++ fns.c 17 Aug 2009 01:25:58 -0000 1.459
@@ -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;
Index: lisp.h
===================================================================
RCS file: /sources/emacs/emacs/src/lisp.h,v
retrieving revision 1.660
retrieving revision 1.661
diff -u -b -r1.660 -r1.661
--- lisp.h 15 Aug 2009 18:25:38 -0000 1.660
+++ lisp.h 17 Aug 2009 01:25:58 -0000 1.661
@@ -1377,9 +1377,12 @@
};
#ifdef HIDE_LISP_IMPLEMENTATION
-#define XFLOAT_DATA(f) (XFLOAT (f)->u.data_)
+#define XFLOAT_DATA(f) (XFLOAT (f)->u.data_ + 0)
#else
-#define XFLOAT_DATA(f) (XFLOAT (f)->u.data)
+#define XFLOAT_DATA(f) (XFLOAT (f)->u.data + 0)
+/* This should be used only in alloc.c, which always disables
+ HIDE_LISP_IMPLEMENTATION. */
+#define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n))
#endif
/* A character, declared with the following typedef, is a member
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog alloc.c dbusbind.c fns.c li...,
Ken Raeburn <=