src/ucx/list.h

changeset 291
deb0035635eb
parent 277
f819fe5e20f5
child 293
d994325445f1
     1.1 --- a/src/ucx/list.h	Wed May 09 20:15:10 2018 +0200
     1.2 +++ b/src/ucx/list.h	Fri May 11 17:40:16 2018 +0200
     1.3 @@ -232,8 +232,6 @@
     1.4   * Inserts an element at the end of the list, if it is not present in the list,
     1.5   * using a UcxAllocator.
     1.6   * 
     1.7 - * See ucx_list_append() for details.
     1.8 - * 
     1.9   * @param allocator the allocator to use
    1.10   * @param list the list where to append the data, or <code>NULL</code> to
    1.11   * create a new list
    1.12 @@ -248,6 +246,38 @@
    1.13          UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata);
    1.14  
    1.15  /**
    1.16 + * Inserts an element at the beginning of the list, if it is not present
    1.17 + * in the list.
    1.18 + * 
    1.19 + * 
    1.20 + * @param list the list where to prepend the data, or <code>NULL</code> to
    1.21 + * create a new list
    1.22 + * @param data the data to insert
    1.23 + * @param cmpfnc the compare function
    1.24 + * @param cmpdata additional data for the compare function
    1.25 + * @return a pointer to the new list head
    1.26 + * @see ucx_list_prepend()
    1.27 + */
    1.28 +UcxList *ucx_list_prepend_once(UcxList *list, void *data,
    1.29 +        cmp_func cmpfnc, void *cmpdata);
    1.30 +
    1.31 +/**
    1.32 + * Inserts an element at the beginning of the list, if it is not present in
    1.33 + * the list, using a UcxAllocator.
    1.34 + * 
    1.35 + * @param allocator the allocator to use
    1.36 + * @param list the list where to prepend the data, or <code>NULL</code> to
    1.37 + * create a new list
    1.38 + * @param data the data to insert
    1.39 + * @param cmpfnc the compare function
    1.40 + * @param cmpdata additional data for the compare function
    1.41 + * @return a pointer to the new list head
    1.42 + * @see ucx_list_prepend_a()
    1.43 + */
    1.44 +UcxList *ucx_list_prepend_once_a(UcxAllocator *allocator,
    1.45 +        UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata);
    1.46 +
    1.47 +/**
    1.48   * Inserts an element at the beginning of the list.
    1.49   * 
    1.50   * You <i>should</i> overwrite the old list pointer by calling

mercurial