Re: GString functions
- From: Owen Taylor <otaylor redhat com>
- To: guinan bluebutton com
- Cc: gtk-list gnome org
- Subject: Re: GString functions
- Date: 17 Mar 2003 19:22:00 -0500
On Mon, 2003-03-17 at 19:10, Jamie Guinan wrote:
> I'm looking at
>
> http://developer.gnome.org/doc/API/2.0/glib/glib-Strings.html
>
> where many of the GString functions return "GString *".
>
> I understand that the ".str" member of a GString can change across
> g_string_*() calls, but are there any guarantees about the returned
> GString itself?
The returned GString is simply the string you passed in,
to allow:
GString *s = g_string_append (g_string_new ("redhat"),
".com");
Ugh. My advice would be to simply forget there is a return
value at all. Your code will be clearest that way.
As for using GObject classes in GLib ... GObject depends
on GLib, not vice-versa, so that isn't possible. It might
have been nice to lump them together and use GObject for
things like GMainContext, GIOChannel, but we didn't
do it that way.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]