# HG changeset patch # User Mike Becker # Date 1526056508 -7200 # Node ID d994325445f1c53e4f16362ac92501d4b7d33f11 # Parent d9abf53b83979b41a6ce9c73f8d53b3d5c7b5bd5 adds deprecation notice for *_append/prepend_once() diff -r d9abf53b8397 -r d994325445f1 src/ucx/list.h --- 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. * + * Note: 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. + * + * Deprecation notice: 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 NULL 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. * + * Note: 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. + * + * Deprecation notice: 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 NULL 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. * + * Note: 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. + * + * Deprecation notice: 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 NULL 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. * + * Note: 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. + * + * Deprecation notice: 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 NULL to * create a new list