(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 *.
2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
+ * 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 *.
+
* eval.c (Fautoload): Don't double-shift a pointer.
* fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
return;
/* Unset session environment. */
- if (data != NULL && data == (void*) XHASH (QCdbus_session_bus))
+ if (data != NULL && data == (void *) XPNTR (QCdbus_session_bus))
{
XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
unsetenv ("DBUS_SESSION_BUS_ADDRESS");
xd_add_watch,
xd_remove_watch,
xd_toggle_watch,
- (void*) XHASH (bus), NULL))
+ (void *) XPNTR (bus), NULL))
XD_SIGNAL1 (build_string ("Cannot add watch functions"));
/* Add bus to list of registered buses. */
if (data != NULL)
while (!NILP (busp))
{
- if (data == (void*) XHASH (CAR_SAFE (busp)))
+ if (data == (void *) XPNTR (CAR_SAFE (busp)))
bus = CAR_SAFE (busp);
busp = CDR_SAFE (busp);
}