Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-17 Thread Aaron Faanes
--- Here's the full patch with those changes applied. This uses \comment{} as well, so it's dependent on that patch. src/wayland-util.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/wayland-util.h b/src/wayland-util.h index aa74512..68d91e2 100644 -

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-17 Thread Kristian Høgsberg
On Mon, Sep 16, 2013 at 11:38:28PM -0500, Aaron Faanes wrote: > On Mon, Sep 16, 2013 at 11:12 PM, Kristian Høgsberg 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

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-17 Thread Aaron Faanes
On Mon, Sep 16, 2013 at 11:12 PM, Kristian Høgsberg 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. > > I think the 'in a memb

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-17 Thread Kristian Høgsberg
On Mon, Sep 16, 2013 at 11:46 AM, Aaron Faanes wrote: > On Mon, Sep 16, 2013 at 12:57 PM, Bill Spitzak wrote: >> >> >>> What if the example was expanded slightly, like so: >>> >>> \code >>> struct wl_container { >>> wl_list link; >>> ... >>> }; >>> >>> struct wl_container container; >>> s

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-17 Thread Aaron Faanes
--- Here's the updated patch. Thanks, Bill and Kristian, for your reviews. Feel free to let me know if anything else needs correcting with this one. src/wayland-util.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/wayland-util.h b/src/wayland-util.h index d

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-16 Thread Bill Spitzak
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

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-16 Thread Aaron Faanes
On Mon, Sep 16, 2013 at 12:57 PM, Bill Spitzak wrote: > > What if the example was expanded slightly, like so: >> >> \code >> struct wl_container { >> wl_list link; >> ... >> }; >> >> struct wl_container container; >> struct wl_list *item = &container.link; >> >> struct wl_container *samp

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-16 Thread Aaron Faanes
On Sun, Sep 15, 2013 at 8:35 PM, Bill Spitzak wrote: > On 09/15/2013 11:09 AM, Aaron Faanes wrote: > >> +/** >> + * Retrieves a pointer to the container of a given item. >> + * >> + * This macro allows conversion from a pointer to a contained item to its >> + * container. This is useful if you ha

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-16 Thread Bill Spitzak
Aaron Faanes wrote: On Sun, Sep 15, 2013 at 8:35 PM, Bill Spitzak > wrote: On 09/15/2013 11:09 AM, Aaron Faanes wrote: +/** + * Retrieves a pointer to the container of a given item. + * + * This macro allows conversion from a point

Re: [PATCH 1/2] utils: Document wl_container_of

2013-09-15 Thread Bill Spitzak
On 09/15/2013 11:09 AM, Aaron Faanes wrote: Modified this documentation to be much less verbose than before. I also added an example, used better doxygen style, and mentioned that wl_container_of is useful outside of just wl_list. --- src/wayland-util.h | 27 +++ 1 fil

[PATCH 1/2] utils: Document wl_container_of

2013-09-15 Thread Aaron Faanes
Modified this documentation to be much less verbose than before. I also added an example, used better doxygen style, and mentioned that wl_container_of is useful outside of just wl_list. --- src/wayland-util.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/wa