Fri, 11 May 2018 18:35:08 +0200
adds deprecation notice for *_append/prepend_once()
src/ucx/list.h | file | annotate | diff | comparison | revisions |
--- a/src/ucx/list.h Fri May 11 18:13:54 2018 +0200 +++ b/src/ucx/list.h Fri May 11 18:35:08 2018 +0200 @@ -215,6 +215,12 @@ /** * Inserts an element at the end of the list, if it is not present in the list. * + * <b>Note:</b> You should not try to store a freshly allocated object. Since + * it might be a duplicate, the memory allocated for that copy would be leaking + * afterwards. + * + * <b>Deprecation notice:</b> This function is considered to do more harm than + * it adds usefulness and is going to be removed in a future UCX release. * * @param list the list where to append the data, or <code>NULL</code> to * create a new list @@ -232,6 +238,13 @@ * Inserts an element at the end of the list, if it is not present in the list, * using a UcxAllocator. * + * <b>Note:</b> You should not try to store a freshly allocated object. Since + * it might be a duplicate, the memory allocated for that copy would be leaking + * afterwards. + * + * <b>Deprecation notice:</b> This function is considered to do more harm than + * it adds usefulness and is going to be removed in a future UCX release. + * * @param allocator the allocator to use * @param list the list where to append the data, or <code>NULL</code> to * create a new list @@ -249,6 +262,12 @@ * Inserts an element at the beginning of the list, if it is not present * in the list. * + * <b>Note:</b> You should not try to store a freshly allocated object. Since + * it might be a duplicate, the memory allocated for that copy would be leaking + * afterwards. + * + * <b>Deprecation notice:</b> This function is considered to do more harm than + * it adds usefulness and is going to be removed in a future UCX release. * * @param list the list where to prepend the data, or <code>NULL</code> to * create a new list @@ -265,6 +284,13 @@ * Inserts an element at the beginning of the list, if it is not present in * the list, using a UcxAllocator. * + * <b>Note:</b> You should not try to store a freshly allocated object. Since + * it might be a duplicate, the memory allocated for that copy would be leaking + * afterwards. + * + * <b>Deprecation notice:</b> This function is considered to do more harm than + * it adds usefulness and is going to be removed in a future UCX release. + * * @param allocator the allocator to use * @param list the list where to prepend the data, or <code>NULL</code> to * create a new list