recursive types work
Joe Shaw
joeshaw@novell.com
Mon Jan 24 15:55:22 PST 2005
Hey,
On Mon, 2005-01-24 at 18:20 -0500, Havoc Pennington wrote:
> In other words if you have array of array of int, and you have zero
> elements in it; then you can recurse into the array of array of int (and
> the resulting sub-iterator will already be at the end, i.e. you can't
> read any elements). But you can't recurse into array of int, because
> there is no array of int - there's no valid iterator position to recurse
> into.
>
> It's trivial to export an iter_init_types_only() that would let you walk
> the type signature rather than the values, if that would be helpful.
Well, I am interested in the values. The problem I am having is that I
don't know whether the array I've just recursed into is empty or not.
And it's the fact that when the array is empty it's invalid is why I am
triggering failed assertions. I think just adding a return value to
dbus_message_iter_recurse() that's basically equivalent to
dbus_message_iter_init() would work.
Joe
More information about the dbus
mailing list