Re: gstring.c tweaks
- From: Havoc Pennington <hp redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: gstring.c tweaks
- Date: 13 Feb 2000 13:23:48 -0500
Tim Janik <timj@gtk.org> writes:
> > g_return_val_if_fail (string != NULL, NULL);
> > g_return_val_if_fail (val != NULL, fstring);
> > + g_return_val_if_fail (pos <= string->len, fstring);
>
> why did you get rid of this g_return_val_if_fail() statement?
> what happens if pos > string->len? how would that be usefull?
>
Didn't I add one here?
> > - g_return_val_if_fail (string != NULL, NULL);
> > - g_string_maybe_expand (string, 1);
> > + return g_string_insert_len(fstring, -1, val, -1);
> > +}
>
> keep the g_return_val_if_fail() statements.
>
This one is now in g_string_insert_len(), do you want it to run twice?
I guess that makes the warning somewhat simpler to understand.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]