Re: const g_ascii_strup, g_ascii_strdown ...



Darin Adler <darin bentspoon com> writes:
> On Thursday, July 19, 2001, at 10:48  AM, Michael Meeks wrote:
> 
> > 	Is it possible for the arguments to these methods to be made
> > const. It's also somewhat strange that eg. g_ascii_strup dups its
> > argument, but g_strup doesn't.
> 
> My original g_ascii_strup modified the string in place to match g_strup. In the
> process of reviewing my change, Owen suggested that I change it to match g_utf8_strup
> which returns a dup of the string, rather than modifying in places as g_strup
> does. When Owen changed the functions to return a dup, he neglected to make the
> parameter type const, which I'll do right now.
> 
> You can look at <http://bugzilla.gnome.org/show_bug.cgi?id=54166> if you want to see
> the history.
> 

Also, though this is probably obvious already, utf8_strup() couldn't
possibly modify in-place, since UTF-8 is variable-width.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]