all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: trunk r117128: Allow any non-nil value to count as true in bool-vector.
       [not found] <E1WmT5a-0004kw-I2@vcs.savannah.gnu.org>
@ 2014-05-20  8:29 ` Michael Albinus
  2014-05-20 14:33   ` Davis Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2014-05-20  8:29 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Dmitry Antipov, emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> === modified file 'src/dbusbind.c'
> --- a/src/dbusbind.c	2014-05-19 07:49:09 +0000
> +++ b/src/dbusbind.c	2014-05-19 19:19:05 +0000
> @@ -387,7 +387,8 @@
>        break;
>
>      case DBUS_TYPE_BOOLEAN:
> -      CHECK_BOOLEAN (object);
> +      /* Every Emacs Lisp object serves as a boolean, so there's nothing
> +	 to check.  */
>        sprintf (signature, "%c", dtype);
>        break;
>

That's wrong. dbusbind.c maps Lisp types to D-Bus types, and it expects
exactly t and nil as boolean values, nothing else. See also
(info "(dbus)Type Conversion")

I've reverted your patch (r117128) and the one from Dmitry (r117125).

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trunk r117128: Allow any non-nil value to count as true in bool-vector.
  2014-05-20  8:29 ` trunk r117128: Allow any non-nil value to count as true in bool-vector Michael Albinus
@ 2014-05-20 14:33   ` Davis Herring
  2014-05-20 19:09     ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Davis Herring @ 2014-05-20 14:33 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Paul Eggert, Dmitry Antipov, emacs-devel

>>        sprintf (signature, "%c", dtype);

sprintf catches the eye, of course.  Why not just write this?

  *signature = dtype;

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trunk r117128: Allow any non-nil value to count as true in bool-vector.
  2014-05-20 14:33   ` Davis Herring
@ 2014-05-20 19:09     ` Michael Albinus
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2014-05-20 19:09 UTC (permalink / raw)
  To: Davis Herring; +Cc: Paul Eggert, Dmitry Antipov, emacs-devel

Davis Herring <herring@lanl.gov> writes:

>>>        sprintf (signature, "%c", dtype);
>
> sprintf catches the eye, of course.  Why not just write this?
>
>   *signature = dtype;

Maybe. But the "%c" format says explicitely "one byte", so I find it
more readable.

Of course, there are different tastes ...

> Davis

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-20 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1WmT5a-0004kw-I2@vcs.savannah.gnu.org>
2014-05-20  8:29 ` trunk r117128: Allow any non-nil value to count as true in bool-vector Michael Albinus
2014-05-20 14:33   ` Davis Herring
2014-05-20 19:09     ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.