GNU bug report logs - #43252
27.1; DBus properties lack type hints or overrides

Previous Next

Package: emacs;

Reported by: Hugh Daschbach <hugh <at> ccss.com>

Date: Mon, 7 Sep 2020 00:55:02 UTC

Severity: normal

Found in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Hugh Daschbach <hugh <at> ccss.com>
Cc: 43252 <at> debbugs.gnu.org
Subject: bug#43252: 27.1; DBus properties lack type hints or overrides
Date: Fri, 18 Sep 2020 17:50:45 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Hugh,

>> + (should ; This should error or the next get should fail
>> +         (equal
>> +          (dbus-set-property
>> +           :session dbus--test-service dbus--test-path
>> +           dbus--test-interface "ByteValue" 1024)
>> +          1024))
>
> No error expected. You haven't given 1024 a type (like :byte), so it is
> handled as :uint32.

And even if you would have prefixed the value with :byte, there won't be
an error. In dbusbind.c, byte values are simply computed by taking the
modulo 255:

	  unsigned char val = XFIXNAT (object) & 0xFF;

":byte 1024" is equal to ":byte 4". Similar conversions happen for the
other basic types, based on numbers.

Maybe we could add some tests for these conversions? Since they are not
restricted to property handling, (a) new test(s) dbus-test01-* would help.

>> Cheers,
>> Hugh

Best regards, Michael.




This bug report was last modified 4 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.