diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2020-10-01 11:20:38 +0200 |
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2020-10-01 11:20:38 +0200 |
| commit | 0aa1e2d9d03cf4c10b58c64067620bb99a41f9e9 (patch) | |
| tree | fee09f79b83e3ee8f6e37852d4e21258b287ebaa | |
| parent | d8a9588034119435beb1f5a005bdee7204093793 (diff) | |
| download | emacs-0aa1e2d9d03cf4c10b58c64067620bb99a41f9e9.tar.gz | |
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.
| -rw-r--r-- | src/dbusbind.c | 9 |
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) : Qnil; } +#define XD_KEYWORDP(object) !NILP (Fkeywordp (object)) + /* Check whether a Lisp symbol is a predefined D-Bus type symbol. */ #define XD_DBUS_TYPE_P(object) \ - SYMBOLP (object) && ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID)) + XD_KEYWORDP (object) && \ + ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID)) /* Determine the DBusType of a given Lisp OBJECT. It is used to convert Lisp objects, being arguments of `dbus-call-method' or @@ -1231,7 +1234,7 @@ this connection to those buses. */) xd_add_watch, xd_remove_watch, xd_toggle_watch, - SYMBOLP (bus) + XD_KEYWORDP (bus) ? (void *) XSYMBOL (bus) : (void *) XSTRING (bus), NULL)) @@ -1797,7 +1800,7 @@ xd_read_queued_messages (int fd, void *data) while (!NILP (busp)) { key = CAR_SAFE (CAR_SAFE (busp)); - if ((SYMBOLP (key) && XSYMBOL (key) == data) + if ((XD_KEYWORDP (key) && XSYMBOL (key) == data) || (STRINGP (key) && XSTRING (key) == data)) bus = key; busp = CDR_SAFE (busp); |
