[PATCH 1/2] utils: Document wl_container_of
Bill Spitzak
spitzak at gmail.com
Mon Sep 16 20:12:35 PDT 2013
Aaron Faanes wrote:
>
>
> /**
> * Retrieves a pointer to the containing struct of a given member item.
> *
> * This macro allows conversion from a pointer to a item(**, in a
> member called
> * link,**) to its containing struct. This is useful if you have a
> contained item
> * like a wl_list, wl_listener, or wl_signal, provided via a callback
> or other
> * means and would like to retrieve the struct that contains it.
> *
> * To demonstrate, given a wl_list contained by a wl_resource ****,
> the wl_resource
> * can be retrieved as follows:
> *
> * \code
> * struct wl_list *some_link = ...;
> * struct wl_resource *resource = NULL;
> *
> * resource = wl_container_of(some_link, resource, link);
> * \endcode
> (the rest is unchanged)
>
Looks good to me except it looks like you accidentally typed the new
text into the wrong paragraph. Move the part surrounded by (**...**) to
where the **** is.
> --
> Aaron Faanes <dafrito at gmail.com <mailto:dafrito at gmail.com>>
More information about the wayland-devel
mailing list