Array length and element padding.

Havoc Pennington hp at redhat.com
Wed Aug 10 08:39:19 PDT 2005


On Wed, 2005-08-10 at 13:00 +0200, Jakub Piotr Cłapa wrote:
> The padding of the first element is not counted to the length of the 
> whole array...
> 
> I really don't care much if it's a mistake or if it should be like this 
> but after spending whole night trying to find why the messages raise 
> error code 35 in the bus I think it would be really cool to mention it 
> somewhere in the specification... ;-)
> 

It is in there:


        A <literal>UINT32</literal> giving the length of the array data
in bytes, followed by 
                  alignment padding to the alignment boundary of the
array element type, 
                  followed by each array element. The array length is
from the 
                  end of the alignment padding to the end of the last
element,
                  i.e. it does not include the padding after the length,
                  or any padding after the last element.
                  Arrays have a maximum length defined to be 2 to the
26th power or
                  67108864. Implementations must not send or accept
arrays exceeding this
                  length.

> Btw. The AddMatch method is also not documented, isn't it?

It is not. There's some documentation in the Doxygen docs though and a
TODO note to document it in the spec.

Havoc




More information about the dbus mailing list