aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorMichael Albinus2020-10-01 11:20:38 +0200
committerMichael Albinus2020-10-01 11:20:38 +0200
commit0aa1e2d9d03cf4c10b58c64067620bb99a41f9e9 (patch)
treefee09f79b83e3ee8f6e37852d4e21258b287ebaa /src/dbusbind.c
parentd8a9588034119435beb1f5a005bdee7204093793 (diff)
downloademacs-0aa1e2d9d03cf4c10b58c64067620bb99a41f9e9.tar.gz
emacs-0aa1e2d9d03cf4c10b58c64067620bb99a41f9e9.zip
Use Fkeywordp in dbusbind.c, again
* src/dbusbind.c (XD_KEYWORDP): New macro. (XD_DBUS_TYPE_P, Fdbus__init_bus, xd_read_queued_messages): Use it.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 54130be685c..cca5f13907d 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -209,9 +209,12 @@ xd_dbus_type_to_symbol (int type)
209 : Qnil; 209 : Qnil;
210} 210}
211 211
212#define XD_KEYWORDP(object) !NILP (Fkeywordp (object))
213
212/* Check whether a Lisp symbol is a predefined D-Bus type symbol. */ 214/* Check whether a Lisp symbol is a predefined D-Bus type symbol. */
213#define XD_DBUS_TYPE_P(object) \ 215#define XD_DBUS_TYPE_P(object) \
214 SYMBOLP (object) && ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID)) 216 XD_KEYWORDP (object) && \
217 ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID))
215 218
216/* Determine the DBusType of a given Lisp OBJECT. It is used to 219/* Determine the DBusType of a given Lisp OBJECT. It is used to
217 convert Lisp objects, being arguments of `dbus-call-method' or 220 convert Lisp objects, being arguments of `dbus-call-method' or
@@ -1231,7 +1234,7 @@ this connection to those buses. */)
1231 xd_add_watch, 1234 xd_add_watch,
1232 xd_remove_watch, 1235 xd_remove_watch,
1233 xd_toggle_watch, 1236 xd_toggle_watch,
1234 SYMBOLP (bus) 1237 XD_KEYWORDP (bus)
1235 ? (void *) XSYMBOL (bus) 1238 ? (void *) XSYMBOL (bus)
1236 : (void *) XSTRING (bus), 1239 : (void *) XSTRING (bus),
1237 NULL)) 1240 NULL))
@@ -1797,7 +1800,7 @@ xd_read_queued_messages (int fd, void *data)
1797 while (!NILP (busp)) 1800 while (!NILP (busp))
1798 { 1801 {
1799 key = CAR_SAFE (CAR_SAFE (busp)); 1802 key = CAR_SAFE (CAR_SAFE (busp));
1800 if ((SYMBOLP (key) && XSYMBOL (key) == data) 1803 if ((XD_KEYWORDP (key) && XSYMBOL (key) == data)
1801 || (STRINGP (key) && XSTRING (key) == data)) 1804 || (STRINGP (key) && XSTRING (key) == data))
1802 bus = key; 1805 bus = key;
1803 busp = CDR_SAFE (busp); 1806 busp = CDR_SAFE (busp);