+2011-04-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dbusbind.c: Do not use XPNTR on a value that may be an integer.
+ Reported by Stefan Monnier in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
+ (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): Use
+ SYMBOLP-guarded XSYMBOL, not XPNTR.
+
2011-04-29 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
return;
/* Unset session environment. */
- if (data != NULL && data == (void *) XPNTR (QCdbus_session_bus))
+ if (SYMBOLP (QCdbus_session_bus) && XSYMBOL (QCdbus_session_bus) == data)
{
XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
unsetenv ("DBUS_SESSION_BUS_ADDRESS");
{
DBusConnection *connection;
+ CHECK_SYMBOL (bus);
+
/* Open a connection to the bus. */
connection = xd_initialize (bus, TRUE);
xd_add_watch,
xd_remove_watch,
xd_toggle_watch,
- (void *) XPNTR (bus), NULL))
+ XSYMBOL (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 *) XPNTR (CAR_SAFE (busp)))
+ if (SYMBOLP (CAR_SAFE (busp)) && XSYMBOL (CAR_SAFE (busp)) == data)
bus = CAR_SAFE (busp);
busp = CDR_SAFE (busp);
}