[PATCH 1/4] config-parser: Document config_section_get_entry()

Derek Foreman derekf at osg.samsung.com
Wed Jan 21 10:37:51 PST 2015


On 20/01/15 05:30 PM, Bryce Harrington wrote:
> From: "Bryce Harrington" <bryce at osg.samsung.com>
> 
> Signed-off-by: Bryce Harrington (http://osg.samsung.com) <bryce at osg.samsung.com>
> Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
>  shared/config-parser.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/shared/config-parser.c b/shared/config-parser.c
> index 4542ca6..b72cb77 100644
> --- a/shared/config-parser.c
> +++ b/shared/config-parser.c
> @@ -130,6 +130,27 @@ config_section_get_entry(struct weston_config_section *section,
>  	return NULL;
>  }
>  
> +/** Lookup matching section from config
> + *
> + * \param config	Configuration data source to look in
> + * \param section	Look for a section with this name (required)
> + * \param key		Only return section with this key set to value (optional)

I think "set to value" should not be present in the above?

> + * \param value		Only return section with key set to this value (optional)
> + *
> + * Looks through the weston_config data structure for a
> + * weston_config_section named \c section, and returns the first match.
> + * If \c key and \c value are specified as non-NULL, then only sections which
> + * contain the exact key=value pair will be returned.
> + *
> + * Note that the matching is case-sensitive, and are performed as string

Grammar discrepancy... is/are

> + * comparisons for the values, so 'foo=1', 'Foo=1', and 'foo=1.0' are not
> + * considered matches.
> + *
> + * \return a weston_config_section pointer matching criteria, or NULL if no
> + * match was found or an error occurred.
> + *
> + * /memberof weston_config

should be a \

> + */
>  WL_EXPORT
>  struct weston_config_section *
>  weston_config_get_section(struct weston_config *config, const char *section,
> 

Otherwise, looks good to me.

Reviewed-by: Derek Foreman <derekf at osg.samsung.com>


More information about the wayland-devel mailing list