pnoltes commented on code in PR #721:
URL: https://github.com/apache/celix/pull/721#discussion_r1468916073


##########
libs/utils/include/celix_array_list.h:
##########
@@ -157,10 +172,27 @@ CELIX_DEFINE_AUTOPTR_CLEANUP_FUNC(celix_array_list_t, 
celix_arrayList_destroy)
 CELIX_UTILS_EXPORT
 int celix_arrayList_size(const celix_array_list_t *list);
 
+/**
+ * @brief Create a shallow copy of the array list.
+ *
+ * The returned array list will be a shallow copy of the provided array list.
+ * If the entries are pointers, the pointers will be copied, but the pointed 
to values will not be copied.
+ * The equals callback provided when the provided array list was created will 
be copied, the removed callback
+ * will not be copied.

Review Comment:
   Maybe, but to honest we did not need a copy of the array list until now. The 
copy is used in `celix_propertiesget*ArrayList`. 
   
   I think adding a ref counter makes the array list more complex, maybe we 
should make a the array list copy a Apache Celix internal API so that we do not 
expose a shallow copy construction as public API. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to