[PATCH] various fixes for marshlling empty fixed type arrays

Rob Taylor robtaylor at floopily.org
Tue Feb 7 08:33:45 PST 2006


Havoc Pennington wrote:
> 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 ...
> 

So was the new version of the patch OK?

>>> - 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)
> 

Ok, I'll add that before committing.

Thanks,
Rob Taylor


More information about the dbus mailing list