[PATCH] various fixes for marshlling empty fixed type arrays

Havoc Pennington hp at redhat.com
Tue Feb 7 07:51:10 PST 2006


On Tue, 2006-02-07 at 09:45 +0000, Rob Taylor wrote:
> 
> >  - why not leave the second assert there?
> /me looks confused... leave it where?
> 

The msgarray_len >= 0 one ...

> >  - prefer msgarray_len != 0 for the test since it's not a bool
> Agreed.
> 
> Modified patch attached.
> 
> > 
> > -  _dbus_return_if_fail (dbus_type_is_fixed
> > (_dbus_type_reader_get_current_type (&real->u.reader)));
> > 
> > Perhaps again the assertion could just be changed to
> > len == 0 || (existing assertion)
> 
> Find attached a better solution. This uses the fact that
> _dbus_type_reader_get_current_type will return DBUS_INVALID if the
> reader is at the end of a block or end of a container.

Though, this one leaves the get_current_type call there with checks
disabled - could bracket that in #ifndef DBUS_DISABLE_CHECKS (or is it
#ifdef ENABLE_CHECKS? whichever)

Havoc




More information about the dbus mailing list