[PATCH wayland 4/4] doc: Add doxygen documentation to wl_display_get_error()

David Herrmann dh.herrmann at googlemail.com
Tue Oct 16 09:26:01 PDT 2012


Hi Ander

Thanks for the patches, I forgot to add the documentation when adding
it. Anyway, see my comments below.

On Tue, Oct 16, 2012 at 4:29 PM, Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira at intel.com> wrote:
> ---
>  src/wayland-client.c |    7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/wayland-client.c b/src/wayland-client.c
> index 2eaecc9..9ac4edb 100644
> --- a/src/wayland-client.c
> +++ b/src/wayland-client.c
> @@ -860,6 +860,13 @@ wl_display_dispatch_pending(struct wl_display *display)
>         return dispatch_queue(display, &display->queue, 0);
>  }
>
> +/** Retrieve the last error sent by the server

Please change this to something like "retrieve the last error that
occurred on this wl_display". This can be an error sent by the server,
but can also be an error that was caused by the local client, so your
message is a bit misleading.
Furthermore, these errors are _fatal_. That is, if this function
returns non-0 you cannot use this wl_display object anymore. Might be
worth noting this here.

> + * \param display The display context object

Shouldn't this be "A display..."?

> + * \return The last error sent asynchronously by \c display

"... or 0 if no error occurred.". And same as above, this is not
neccessarily an error sent by the server.

> + * \memberof wl_display
> + */
>  WL_EXPORT int
>  wl_display_get_error(struct wl_display *display)
>  {

Thanks!
David


More information about the wayland-devel mailing list