Re: glib outstanding stuff
- From: David Benson <daveb ffem org>
- To: Havoc Pennington <hp redhat com>
- Cc: Joel Becker <jlbec evilplan org>, gtk-devel-list gnome org
- Subject: Re: glib outstanding stuff
- Date: Wed, 4 Oct 2000 18:36:50 -0700 (PDT)
except if the file is a fifo (or an entry in /proc),
so probably a fallback to havoc's original implemention
would be a good idea.
- dave
On 4 Oct 2000, Havoc Pennington wrote:
>
> Joel Becker <jlbec evilplan org> writes:
> > If the file is too big, the initial g_new() will fail, so there
> > is no crash. In addition, this saves all the resizings of the g_string.
> > As we are willing to read as large a chunk as the kernel will give us,
> > we don't need buffering ala stdio.
> > This is what I have in my personal convenience libs (modulo
> > error checking, of course). If there's a good reason for your version,
> > I'd like to know so I can change. :-)
> >
>
> Yes, your version looks better to me (modulo the fact that g_new()
> does indeed crash if it fails - but we can just replace it with
> g_try_malloc() and it will be fine).
>
> Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]