Function: dbus-flatten-types

dbus-flatten-types is a byte-compiled function defined in dbus.el.gz.

Signature

(dbus-flatten-types ARG)

Documentation

Flatten type information from argument retrieved via dbus-handle-event.

Basic type arguments (TYPE VALUE) will be transformed into TYPE VALUE, and compound type arguments (TYPE VALUE) will be kept as is.

Source Code

;; Defined in /usr/src/emacs/lisp/net/dbus.el.gz
(defun dbus-flatten-types (arg)
  "Flatten type information from argument retrieved via `dbus-handle-event'.
Basic type arguments (TYPE VALUE) will be transformed into TYPE VALUE, and
compound type arguments (TYPE VALUE) will be kept as is."
  (let (result)
    (dolist (elt arg)
      (cond
       ((atom elt) (push elt result))
       ((and (not (memq (car elt) dbus-compound-types)))
	(push (car elt) result)
	(push (cadr elt) result))
       (t
	(push (cons (car elt) (dbus-flatten-types (cdr elt))) result))))
    (nreverse result)))