changeset 106730:d1805c8df951

(xd_remove_watch): Avoid trying to convert a void* to Lisp_Object, preferring to convert a lisp_Object to a void* instead. (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 04 Jan 2010 12:38:20 -0500
parents b4d5ac4906a0
children 79fa2d910b72
files src/ChangeLog src/dbusbind.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Jan 03 22:40:30 2010 -0800
+++ b/src/ChangeLog	Mon Jan 04 12:38:20 2010 -0500
@@ -1,3 +1,9 @@
+2010-01-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* dbusbind.c (xd_remove_watch): Avoid trying to convert a void* to
+	Lisp_Object, preferring to convert a lisp_Object to a void* instead.
+	(Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
+
 2010-01-03  Michael Albinus  <michael.albinus@gmx.de>
 
 	* dbusbind.c (xd_add_watch): Improve debug message.
@@ -21221,7 +21227,7 @@
 ;; add-log-time-zone-rule: t
 ;; End:
 
-    Copyright (C) 2007, 2008, 2009  Free Software Foundation, Inc.
+    Copyright (C) 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
   This file is part of GNU Emacs.
 
--- a/src/dbusbind.c	Sun Jan 03 22:40:30 2010 -0800
+++ b/src/dbusbind.c	Mon Jan 04 12:38:20 2010 -0500
@@ -805,7 +805,7 @@
 	return;
 
       /* Unset session environment.  */
-      if ((data != NULL) && (EQ ((Lisp_Object) data, QCdbus_session_bus)))
+      if ((data != NULL) && (data == (void*) XHASH (QCdbus_session_bus)))
 	{
 	  XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
 	  unsetenv ("DBUS_SESSION_BUS_ADDRESS");
@@ -838,7 +838,7 @@
   if (!dbus_connection_set_watch_functions (connection,
 					    xd_add_watch,
 					    xd_remove_watch,
-					    NULL, (void *) bus, NULL))
+					    NULL, (void*) XHASH (bus), NULL))
     XD_SIGNAL1 (build_string ("Cannot add watch functions"));
 
   /* Return.  */