[PATCH wayland 0/4] wl_array: documentation and test

Yong Bakos junk at humanoriented.com
Fri Sep 16 22:37:35 UTC 2016


From: Yong Bakos <ybakos at humanoriented.com>

This series adds documentation to wl_array and its methods. You can ignore the
warning during documentation building; it is caused by a reference to
`wl_list_for_each`, which is anticipated in a separate patch (up for review).

There is one implementation change: setting the `data` pointer to NULL after
free, in wl_array_release. I did not set `size` and `alloc` to 0, in order to
keep the change miniminal. I do think it would would be better to set them to 0,
rather than document that `wl_array_release` leaves the wl_array in an invalid
state.

Regards,
yong

Yong Bakos (4):
  util: Document wl_array
  wl_array: Set data to null after free
  tests: Test wl_array_release
  array-test: Include wayland-util.h and simplify init test

 src/wayland-util.c |  1 +
 src/wayland-util.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 tests/array-test.c | 28 ++++++++++++-----------
 3 files changed, 77 insertions(+), 18 deletions(-)

--
2.7.2



More information about the wayland-devel mailing list