[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102320: * dbusbind.c (QCdbus_type_un
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102320: * dbusbind.c (QCdbus_type_unix_fd): New Lisp object. |
Date: |
Wed, 10 Nov 2010 09:48:18 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102320
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2010-11-10 09:48:18 +0100
message:
* dbusbind.c (QCdbus_type_unix_fd): New Lisp object.
(XD_BASIC_DBUS_TYPE, xd_symbol_to_dbus_type, xd_signature)
(xd_append_arg, xd_retrieve_arg): Support DBUS_TYPE_UNIX_FD.
(Fdbus_call_method): Add DBUS_TYPE_UNIX_FD type mapping to doc string.
(syms_of_dbusbind): Initialize QCdbus_type_unix_fd).
modified:
src/ChangeLog
src/dbusbind.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-11-10 03:45:29 +0000
+++ b/src/ChangeLog 2010-11-10 08:48:18 +0000
@@ -1,3 +1,11 @@
+2010-11-10 Michael Albinus <address@hidden>
+
+ * dbusbind.c (QCdbus_type_unix_fd): New Lisp object.
+ (XD_BASIC_DBUS_TYPE, xd_symbol_to_dbus_type, xd_signature)
+ (xd_append_arg, xd_retrieve_arg): Support DBUS_TYPE_UNIX_FD.
+ (Fdbus_call_method): Add DBUS_TYPE_UNIX_FD type mapping to doc string.
+ (syms_of_dbusbind): Initialize QCdbus_type_unix_fd).
+
2010-11-10 Glenn Morris <address@hidden>
* emacs.c (syms_of_emacs) <system-type>: Doc fix.
=== modified file 'src/dbusbind.c'
--- a/src/dbusbind.c 2010-11-01 15:18:42 +0000
+++ b/src/dbusbind.c 2010-11-10 08:48:18 +0000
@@ -57,6 +57,9 @@
Lisp_Object QCdbus_type_int64, QCdbus_type_uint64;
Lisp_Object QCdbus_type_double, QCdbus_type_string;
Lisp_Object QCdbus_type_object_path, QCdbus_type_signature;
+#ifdef DBUS_TYPE_UNIX_FD
+Lisp_Object QCdbus_type_unix_fd;
+#endif
Lisp_Object QCdbus_type_array, QCdbus_type_variant;
Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry;
@@ -147,6 +150,22 @@
#endif
/* Check whether TYPE is a basic DBusType. */
+#ifdef DBUS_TYPE_UNIX_FD
+#define XD_BASIC_DBUS_TYPE(type) \
+ ((type == DBUS_TYPE_BYTE) \
+ || (type == DBUS_TYPE_BOOLEAN) \
+ || (type == DBUS_TYPE_INT16) \
+ || (type == DBUS_TYPE_UINT16) \
+ || (type == DBUS_TYPE_INT32) \
+ || (type == DBUS_TYPE_UINT32) \
+ || (type == DBUS_TYPE_INT64) \
+ || (type == DBUS_TYPE_UINT64) \
+ || (type == DBUS_TYPE_DOUBLE) \
+ || (type == DBUS_TYPE_STRING) \
+ || (type == DBUS_TYPE_OBJECT_PATH) \
+ || (type == DBUS_TYPE_SIGNATURE \
+ || (type == DBUS_TYPE_UNIX_FD))
+#else
#define XD_BASIC_DBUS_TYPE(type) \
((type == DBUS_TYPE_BYTE) \
|| (type == DBUS_TYPE_BOOLEAN) \
@@ -160,6 +179,7 @@
|| (type == DBUS_TYPE_STRING) \
|| (type == DBUS_TYPE_OBJECT_PATH) \
|| (type == DBUS_TYPE_SIGNATURE))
+#endif
/* This was a macro. On Solaris 2.11 it was said to compile for
hours, when optimzation is enabled. So we have transferred it into
@@ -182,6 +202,9 @@
: (EQ (object, QCdbus_type_string)) ? DBUS_TYPE_STRING
: (EQ (object, QCdbus_type_object_path)) ? DBUS_TYPE_OBJECT_PATH
: (EQ (object, QCdbus_type_signature)) ? DBUS_TYPE_SIGNATURE
+#ifdef DBUS_TYPE_UNIX_FD
+ : (EQ (object, QCdbus_type_unix_fd)) ? DBUS_TYPE_UNIX_FD
+#endif
: (EQ (object, QCdbus_type_array)) ? DBUS_TYPE_ARRAY
: (EQ (object, QCdbus_type_variant)) ? DBUS_TYPE_VARIANT
: (EQ (object, QCdbus_type_struct)) ? DBUS_TYPE_STRUCT
@@ -238,6 +261,9 @@
case DBUS_TYPE_UINT16:
case DBUS_TYPE_UINT32:
case DBUS_TYPE_UINT64:
+#ifdef DBUS_TYPE_UNIX_FD
+ case DBUS_TYPE_UNIX_FD:
+#endif
CHECK_NATNUM (object);
sprintf (signature, "%c", dtype);
break;
@@ -451,6 +477,9 @@
}
case DBUS_TYPE_UINT32:
+#ifdef DBUS_TYPE_UNIX_FD
+ case DBUS_TYPE_UNIX_FD:
+#endif
CHECK_NUMBER (object);
{
dbus_uint32_t val = XUINT (object);
@@ -648,6 +677,9 @@
}
case DBUS_TYPE_UINT32:
+#ifdef DBUS_TYPE_UNIX_FD
+ case DBUS_TYPE_UNIX_FD:
+#endif
{
dbus_uint32_t val;
dbus_message_iter_get_basic (iter, &val);
@@ -983,6 +1015,7 @@
DBUS_TYPE_UINT16 => number
DBUS_TYPE_INT16 => integer
DBUS_TYPE_UINT32 => number or float
+ DBUS_TYPE_UNIX_FD => number or float
DBUS_TYPE_INT32 => integer or float
DBUS_TYPE_UINT64 => number or float
DBUS_TYPE_INT64 => integer or float
@@ -2104,6 +2137,11 @@
QCdbus_type_signature = intern_c_string (":signature");
staticpro (&QCdbus_type_signature);
+#ifdef DBUS_TYPE_UNIX_FD
+ QCdbus_type_unix_fd = intern_c_string (":unix-fd");
+ staticpro (&QCdbus_type_unix_fd);
+#endif
+
QCdbus_type_array = intern_c_string (":array");
staticpro (&QCdbus_type_array);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102320: * dbusbind.c (QCdbus_type_unix_fd): New Lisp object.,
Michael Albinus <=