mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-04 13:29:51 -05:00
util: Comments before wl_list were a bit off, fixed the example usage.
Signed-off-by: Üstün Ergenoğlu <ego@ustun.fi>
This commit is contained in:
parent
d0711b27ee
commit
a676b8f257
1 changed files with 12 additions and 4 deletions
|
|
@ -80,10 +80,18 @@ struct wl_object {
|
||||||
*
|
*
|
||||||
* The following code will initialize a list:
|
* The following code will initialize a list:
|
||||||
*
|
*
|
||||||
* wl_list_init(foo_list);
|
* struct wl_list foo_list;
|
||||||
* wl_list_insert(foo_list, item1); Pushes item1 at the head
|
*
|
||||||
* wl_list_insert(foo_list, item2); Pushes item2 at the head
|
* struct item_t {
|
||||||
* wl_list_insert(item2, item3); Pushes item3 after item2
|
* int foo;
|
||||||
|
* struct wl_list link;
|
||||||
|
* };
|
||||||
|
* struct item_t item1, item2, item3;
|
||||||
|
*
|
||||||
|
* wl_list_init(&foo_list);
|
||||||
|
* wl_list_insert(&foo_list, &item1.link); Pushes item1 at the head
|
||||||
|
* wl_list_insert(&foo_list, &item2.link); Pushes item2 at the head
|
||||||
|
* wl_list_insert(&item2.link, &item3.link);Pushes item3 after item2
|
||||||
*
|
*
|
||||||
* The list now looks like [item2, item3, item1]
|
* The list now looks like [item2, item3, item1]
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue