Clarifications on the D-Bus specification

Havoc Pennington hp at pobox.com
Fri Dec 10 07:20:14 PST 2010


Hi,

2010/12/9 Rémi Denis-Courmont <remi at remlab.net>:
> 1/ Structures cannot be nested more than 32 times. Does that include
> dictionary entries as well? Or is there no specific limit for dictionary
> entries? (They can only be inside arrays and array nesting is limited anyhow)

I would think that a dict entry counts as a struct here.

          <para>
                The maximum depth of container type nesting is 32 array type
                codes and 32 open parentheses. This implies that the maximum
                total depth of recursion is 64, for an "array of array of array
                of ... struct of struct of struct of ..."  where there are 32
                array and 32 struct.
              </para>

> 2/ What is the limit on variant nesting? I cannot see any mention of that?!

The limits are really on one signature, so I would think each variant
contains a new signature and thus would reset the nest limits.

Really, not sure the nesting limit is that useful since signatures are
already limited to 255 bytes, that's effectively a cap on nesting
already.

Havoc


More information about the dbus mailing list