Re: Behaviour of getters wrt dup/ref
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-devel-list gnome org
- Subject: Re: Behaviour of getters wrt dup/ref
- Date: Sun, 16 Sep 2007 18:21:23 +0200
On Sun, Sep 16, 2007 at 12:12:11PM -0400, Behdad Esfahbod wrote:
> >
> > The right interface for this type of functions have been
> > already invented: that of glibc's getline. It can allocate
> > new buffers, it can reuse existing buffers resizing them if
> > necessary -- and it can be even used with GStrings [if they
> > use the same memory allocator] although that's a bit dirty.
>
> Well, that's exactly what happens if you make the API take GString.
I reacted to the remark that many people do not like having
to pass a GString (perhaps understandably). The `decomposed
GString' interface of getline() is then the next reasonable
candidate.
Yeti
--
http://gwyddion.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]