aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-27 17:48:19 -0700
committerPaul Eggert2011-04-27 17:48:19 -0700
commit2a866e7b9881176980c0a4acb998e1625aabf87f (patch)
tree09d297e84c9af76f10cf607b0979a31d4c8364a2 /src
parent51639eace139fdbed3522d4f752d771e6c66b067 (diff)
downloademacs-2a866e7b9881176980c0a4acb998e1625aabf87f.tar.gz
emacs-2a866e7b9881176980c0a4acb998e1625aabf87f.zip
* dbusbind.c: Don't possibly lose pointer info when converting.
(xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): Use XPNTR rather than XHASH, so that the high-order bits of the pointer aren't lost when converting through void *.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dbusbind.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 442e8e3b1f6..52b7f323cd3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12011-04-28 Paul Eggert <eggert@cs.ucla.edu> 12011-04-28 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * dbusbind.c: Don't possibly lose pointer info when converting.
4 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
5 Use XPNTR rather than XHASH, so that the high-order bits of
6 the pointer aren't lost when converting through void *.
7
3 * eval.c (Fautoload): Don't double-shift a pointer. 8 * eval.c (Fautoload): Don't double-shift a pointer.
4 9
5 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long. 10 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 4c0b9bd017a..06feec3e792 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -892,7 +892,7 @@ xd_remove_watch (DBusWatch *watch, void *data)
892 return; 892 return;
893 893
894 /* Unset session environment. */ 894 /* Unset session environment. */
895 if (data != NULL && data == (void*) XHASH (QCdbus_session_bus)) 895 if (data != NULL && data == (void *) XPNTR (QCdbus_session_bus))
896 { 896 {
897 XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); 897 XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
898 unsetenv ("DBUS_SESSION_BUS_ADDRESS"); 898 unsetenv ("DBUS_SESSION_BUS_ADDRESS");
@@ -929,7 +929,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0,
929 xd_add_watch, 929 xd_add_watch,
930 xd_remove_watch, 930 xd_remove_watch,
931 xd_toggle_watch, 931 xd_toggle_watch,
932 (void*) XHASH (bus), NULL)) 932 (void *) XPNTR (bus), NULL))
933 XD_SIGNAL1 (build_string ("Cannot add watch functions")); 933 XD_SIGNAL1 (build_string ("Cannot add watch functions"));
934 934
935 /* Add bus to list of registered buses. */ 935 /* Add bus to list of registered buses. */
@@ -1824,7 +1824,7 @@ xd_read_queued_messages (int fd, void *data, int for_read)
1824 if (data != NULL) 1824 if (data != NULL)
1825 while (!NILP (busp)) 1825 while (!NILP (busp))
1826 { 1826 {
1827 if (data == (void*) XHASH (CAR_SAFE (busp))) 1827 if (data == (void *) XPNTR (CAR_SAFE (busp)))
1828 bus = CAR_SAFE (busp); 1828 bus = CAR_SAFE (busp);
1829 busp = CDR_SAFE (busp); 1829 busp = CDR_SAFE (busp);
1830 } 1830 }