Re: g_strdupv
- From: Jon Trowbridge <trow ximian com>
- To: Havoc Pennington <hp redhat com>
- Cc: Martin Baulig <martin home-of-linux org>, gtk-devel-list gnome org
- Subject: Re: g_strdupv
- Date: 10 Jun 2001 16:05:40 -0500
On 10 Jun 2001 16:38:56 -0400, Havoc Pennington wrote:
>
> Martin Baulig <martin home-of-linux org> writes:
> >
> > is there a reason why g_strdupv() takes a `gchar **str_array'
> > and not a `const gchar **str_array' ?
> >
>
> All the gchar** in GTK/GLib are like that.
>
> The reason is that C is stupid and will warn about passing "gchar**"
> to "const gchar**'.
Plus, in a perfectly const-correct world you'd want to declare
gchar **g_strdupv(const gchar * const *strv);
but if people see that in your API, they get very unhappy. :-)
-JT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]