_dbus_string_tolower_ascii()

Ralf Habacker ralf.habacker at freenet.de
Thu Feb 25 10:41:28 PST 2010


Am 25.02.2010 17:58, schrieb Colin Walters:
> Hi,
>
> On Wed, Feb 24, 2010 at 9:04 AM, Ralf Habacker<ralf.habacker at freenet.de>  wrote:
>
> First, there's various trailing whitespace in the patch.
This may also come from windows/unix eol difference.
> You might
> find my script for
> fixing this useful:
>
> http://cgwalters.livejournal.com/25021.html
>
>    
Thanks I tried it with success. +dbus_bool_t
<snip>
> +_dbus_string_tolower_ascii (const DBusString *str,
> +                            int               start,
> +                            int               len)
>
> Thinking about it I really don't like this function returning a bool
> for whether or not the passed in bounds were valid.  Every single
> other function in dbus-string.h (and really, DBus in general) uses the
> boolean for out of memory.
>
> The range check should just be _dbus_assert I think, and this function
> should return void.
>
>    
Is this really good ? As you mentioned in [1] there are many test cases 
not implementable. In fact I'm only allowed to write test cases for oom 
errors, which will not cover the complete range of possible function 
problems.
>> +#if defined(_DEBUG)&&  defined(DBUS_WIN)
>> +  char *dummy1;       /**<  placeholder */
>> +#else
>>    const void *dummy1; /**<  placehlder */
>> +#endif
>>      
> Also what is the rationale behind this change?  It seems totally unrelated...
>    
Otherwise it is very hard to see the content of a DBusString for 
debugging purpose, but sure, I can may a different patch.

Regards
  Ralf






More information about the dbus mailing list