Re: [patch] add G_GNUC_WARNUNCHECKED define
- From: Johannes Stezenbach <js convergence de>
- To: Sven Neumann <sven gimp org>
- Cc: Federico Mena Quintero <federico ximian com>, Arjan van de Ven <arjanv redhat com>, GTK+ development mailing list <gtk-devel-list gnome org>, Owen Taylor <otaylor redhat com>
- Subject: Re: [patch] add G_GNUC_WARNUNCHECKED define
- Date: Thu, 8 Jul 2004 12:51:05 +0200
Sven Neumann wrote:
> Federico Mena Quintero <federico ximian com> writes:
>
> > Isn't it enough of a rule to say that all functions that return new
> > references to objects or newly-allocated memory should be marked with
> > this attribute?
> >
> > E.g. gtk_file_chooser_get_filename() would be one, but not
> > gtk_entry_get_text().
>
> We already have G_CONST_RETURN to indicate this difference. Do you
> really want to clutter the API with G_GNUC_WARNUNCHECKED? I don't
> think that's a good idea in general even though it would certainly be
> correct.
G_CONST_RETURN is something entirely different from the
proposed G_GNUC_WARNUNCHECKED. It would have saved me quite
some time if the compiler had warned me that I forgot the
store the result of g_list_append().
Regards,
Johannes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]