[PATCH wayland 1/2] util: Document wl_list methods
Yong Bakos
junk at humanoriented.com
Fri Aug 26 14:28:26 UTC 2016
On Aug 26, 2016, at 2:12 AM, Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
>
> Hi,
>
>
>>
>> +/**
>> + * Removes an element from the list.
>> + *
>> + * \param elm element to remove from the list
>> + */
> I think this should mention that elm is left in an invalid state, and
> the user should call wl_list_init on it before using it again.
>
> Cheers,
> Giulio
Thanks Giulio. Or, should wl_list_remove be modified to ensure that
next and prev point to elm? (Either way, I'll add the details to
the dox.)
yong
>> void
>> wl_list_remove(struct wl_list *elm);
>>
>> +/**
>> + * Determines the length of the list.
>> + *
>> + * \note This is an O(n) operation.
>> + *
>> + * \param list list whose length is to be determined
>> + *
>> + * \return number of elements in the list
>> + */
>> int
>> wl_list_length(const struct wl_list *list);
>>
>> +/**
>> + * Determines if the list is empty.
>> + *
>> + * \param list list whose emptiness is to be determined
>> + *
>> + * \return 1 if empty, or 0 if not empty
>> + */
>> int
>> wl_list_empty(const struct wl_list *list);
>>
>> +/**
>> + * Inserts all of the elements of one list into another, after the element
>> + * represented by `list`.
>> + *
>> + * \param list list element after which the other list elements will be inserted
>> + * \param other list of elements to insert
>> + *
>> + */
>> void
>> wl_list_insert_list(struct wl_list *list, struct wl_list *other);
>>
>> --
>> 2.7.2
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list