Re: glib CVS ?
- From: Tim Janik <timj gtk org>
- To: DINH Viet Hoa <dinh viet hoa free fr>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: glib CVS ?
- Date: Mon, 26 Nov 2001 15:36:23 +0100 (CET)
On Mon, 26 Nov 2001, DINH Viet Hoa wrote:
> On Mon, 26 Nov 2001 12:34:07 +0100 (CET)
> "Tim Janik" <timj gtk org> wrote:
>
> > > > > GString should be changed in order to use these
> > > > > g_try_realloc/g_try_malloc in order to recover from failed memory
> > > > > allocation, don't you think so ?
> > > >
> > > > nope, GString's API doesn't have any provisions for reporting errors
> > > > ala "don't use me i couldn't allocate enough memory".
>
> it seems that GString API can report such errors, for example
> g_string_append return a GString *, we can return NULL on errors,
> and it seems that almost all functions in API concerning memory
> reallocation can return error notification this way.
no we can't, the GString* returns hand out the GString* passed in and
are in place for nested function calls, i.e.:
g_string_append (g_string_new ("foo"), " bar");
> > > Couldn't it be added (I can do it and submit a patch)
> >
> > nope, we're in API freeze already.
>
> there would not be any API changed.
changing a function to return NULL that was guaranteed to not
return NULL for four years certainly _is_ and API change.
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]