bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23741: 25.0.94; dbus crashes on 32-bit Cygwin


From: Ken Brown
Subject: bug#23741: 25.0.94; dbus crashes on 32-bit Cygwin
Date: Fri, 10 Jun 2016 17:11:11 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 6/10/2016 12:12 PM, Ken Brown wrote:
> I suspect that there is a simple solution, which involves storing the 
> connection address in a Lisp Object of type other than integer, but I'll 
> leave that to the experts.

The following seems to fix it:

diff --git a/src/dbusbind.c b/src/dbusbind.c
index d3a32c0..56bfd71 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -943,7 +943,7 @@ xd_get_connection_references (DBusConnection *connection)
 static DBusConnection*
 xd_lisp_dbus_to_dbus (Lisp_Object bus)
 {
-  return (DBusConnection *) (intptr_t) XFASTINT (bus);
+  return (DBusConnection *) XSAVE_POINTER (bus, 0);
 }

 /* Return D-Bus connection address.  BUS is either a Lisp symbol,
@@ -1187,7 +1187,7 @@ this connection to those buses.  */)
        XD_SIGNAL1 (build_string ("Cannot add watch functions"));

       /* Add bus to list of registered buses.  */
-      XSETFASTINT (val, (intptr_t) connection);
+      val = make_save_ptr (connection);
       xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);

       /* Cleanup.  */


Ken





reply via email to

[Prev in Thread] Current Thread [Next in Thread]