emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108177: * dbusbind.c (xd_register


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108177: * dbusbind.c (xd_registered_buses): New internal Lisp object.
Date: Fri, 02 Nov 2012 02:18:02 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108177
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2012-05-09 23:13:43 +0200
message:
  * dbusbind.c (xd_registered_buses): New internal Lisp object.
  Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
  (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
  Initialize xd_registered_buses.
modified:
  src/ChangeLog
  src/dbusbind.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-09 17:51:30 +0000
+++ b/src/ChangeLog     2012-05-09 21:13:43 +0000
@@ -1,3 +1,10 @@
+2012-05-09  Michael Albinus  <address@hidden>
+
+       * dbusbind.c (xd_registered_buses): New internal Lisp object.
+       Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
+       (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
+       Initialize xd_registered_buses.
+
 2012-05-09  Paul Eggert  <address@hidden>
 
        Untag more efficiently if USE_LSB_TAG.

=== modified file 'src/dbusbind.c'
--- a/src/dbusbind.c    2012-05-09 15:07:46 +0000
+++ b/src/dbusbind.c    2012-05-09 21:13:43 +0000
@@ -64,6 +64,11 @@
 static Lisp_Object QCdbus_registered_serial, QCdbus_registered_method;
 static Lisp_Object QCdbus_registered_signal;
 
+/* Alist of D-Bus buses we are polling for messages.
+   The key is the symbol or string of the bus, and the value is the
+   connection address.  */
+static Lisp_Object xd_registered_buses;
+
 /* Whether we are reading a D-Bus event.  */
 static int xd_in_read_queued_messages = 0;
 
@@ -903,7 +908,7 @@
   DBusConnection *connection;
   Lisp_Object val;
 
-  val = CDR_SAFE (Fassoc (bus, Vdbus_registered_buses));
+  val = CDR_SAFE (Fassoc (bus, xd_registered_buses));
   if (NILP (val))
     XD_SIGNAL2 (build_string ("No connection to bus"), bus);
   else
@@ -1003,7 +1008,7 @@
   Lisp_Object val;
 
   /* Check whether we are connected.  */
-  val = Fassoc (bus, Vdbus_registered_buses);
+  val = Fassoc (bus, xd_registered_buses);
   if (NILP (val))
     return;
 
@@ -1022,7 +1027,7 @@
   dbus_connection_unref (connection);
 
   /* Remove bus from list of registered buses.  */
-  Vdbus_registered_buses = Fdelete (val, Vdbus_registered_buses);
+  xd_registered_buses = Fdelete (val, xd_registered_buses);
 
   /* Return.  */
   return;
@@ -1115,7 +1120,7 @@
 
   /* Add bus to list of registered buses.  */
   XSETFASTINT (val, (intptr_t) connection);
-  Vdbus_registered_buses = Fcons (Fcons (bus, val), Vdbus_registered_buses);
+  xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
 
   /* We do not want to abort.  */
   putenv ((char *) "DBUS_FATAL_WARNINGS=0");
@@ -1608,7 +1613,7 @@
 static void
 xd_read_queued_messages (int fd, void *data, int for_read)
 {
-  Lisp_Object busp = Vdbus_registered_buses;
+  Lisp_Object busp = xd_registered_buses;
   Lisp_Object bus = Qnil;
   Lisp_Object key;
 
@@ -1728,14 +1733,6 @@
     doc: /* Message type of a signal message.  */);
   Vdbus_message_type_signal = make_number (DBUS_MESSAGE_TYPE_SIGNAL);
 
-  DEFVAR_LISP ("dbus-registered-buses",
-              Vdbus_registered_buses,
-    doc: /* Alist of D-Bus buses we are polling for messages.
-
-The key is the symbol or string of the bus, and the value is the
-connection address.  */);
-  Vdbus_registered_buses = Qnil;
-
   DEFVAR_LISP ("dbus-registered-objects-table",
               Vdbus_registered_objects_table,
     doc: /* Hash table of registered functions for D-Bus.
@@ -1789,6 +1786,10 @@
   Vdbus_debug = Qnil;
 #endif
 
+  /* Initialize internal objects.  */
+  xd_registered_buses = Qnil;
+  staticpro (&xd_registered_buses);
+
   Fprovide (intern_c_string ("dbusbind"), Qnil);
 
 }


reply via email to

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