[PATCH] various fixes for marshlling empty fixed type arrays
Rob Taylor
robtaylor at floopily.org
Mon Feb 13 06:16:24 PST 2006
Havoc Pennington wrote:
> Hi,
>
> I think there's probably a better way to fix the dbus-marshal-basic.c
> issue (I'm not sure where it was breaking); the functions called there
> should allow a length of 0, so I'm guessing the problem was a NULL
> array_start or something? If so perhaps making dbus_string_copy allow a
> NULL string when length is 0 would be a nicer fix.
>
Sorry, I forgot to reply to this last week - I blame illness ;)
There is an issue that _dbus_string_init_const_len will assert if value
is NULL even if length is null, I'm not sure if this is correct or not..
I did the patch this way to avoid this call and as it'd be more
efficient (not allocating, then freeing a 1 byte string). But you're
quite right, this patch doesn't look quite right. What's your suggestion?
Thanks
Rob Taylor
More information about the dbus
mailing list