Re: Lines starting with "returns"
- From: Damon Chaplin <damon ximian com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Matthias Clasen <maclas gmx de>, gtk-doc-list gnome org
- Subject: Re: Lines starting with "returns"
- Date: 28 Apr 2002 17:17:10 -0400
On Sun, 2002-04-28 at 12:36, Owen Taylor wrote:
>
> Matthias Clasen <maclas gmx de> writes:
>
> > Here is a patch to fix #65997. It changes the source scanning of gtk-doc
> > to ignore lines starting with "returns" when the return value was
> > already specified as @returns: in the parameter section.
>
> What about the template that the commonly used emacs macro
> produces:
>
> /**
> * gtk_window_get_title:
> * @window: a #GtkWindow
> *
> * Retrieves the title of the window. See gtk_window_set_title().
> *
> * Return value: the title of the window, or %NULL if none has
> * been set explicitely. The returned string is owned by the widget
> * and must not be modified or freed.
> **/
>
> Where the return value is specified as "Return value:" and
> after the parameter section. Can we do anything about that?
>
> (Or does it just work since the Return Value: section is after?
> Haven't checked recently.)
I don't think the patch affects those. All the patch does is set
$ignore_returns if it finds a 'Returns:' field in the top part.
Then it won't look for 'Returns' any more.
If gtk-doc finds 2 'Returns' descriptions, after the parameter
descriptions, it assumes the first one was the main function description
and the second one was the return value description, so it should work.
i.e. something like:
/**
* gtk_window_get_title:
* @window: a #GtkWindow
*
* Returns the title of the window. See gtk_window_set_title().
*
* Return value: the title of the window, or %NULL if none has
* been set explicitely. The returned string is owned by the widget
* and must not be modified or freed.
**/
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]