Re: gtk_label_get_text() string duping
- From: Havoc Pennington <hp redhat com>
- To: Darin Adler <darin eazel com>
- Cc: Hacking Gnomes <Gnome-Hackers athena nuclecu unam mx>,Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: gtk_label_get_text() string duping
- Date: 26 Jun 2000 21:20:58 -0400
Darin Adler <darin@eazel.com> writes:
> For the simplest code the "peek"-type calls are way handier, but they are
> poorer at encapsulation, which is why I prefer "get" to be the default and
> have the most straightforward name.
>
Owen mentioned the same point earlier today, and I was already
thinking along these lines.
I do think it's unfortunate to expose to callers of a function whether
or not the string happens to already be stored somewhere. This is a
pretty strong argument for the always-return-a-copy behavior for _get_
IMO. Perhaps we should look at renaming the non-copying functions
_peek_ instead of renaming the copying functions _dup_.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]