--- a/src/cx/list.h Fri Oct 24 21:15:14 2025 +0200 +++ b/src/cx/list.h Sat Oct 25 21:12:59 2025 +0200 @@ -976,10 +976,11 @@ * @param clone_func the clone function for the elements * @param clone_allocator the allocator that is passed to the clone function * @param data optional additional data that is passed to the clone function - * @return the number of elements that have been successfully cloned + * @retval zero when all elements were successfully cloned + * @retval non-zero when an allocation error occurred */ cx_attr_nonnull_arg(1, 2, 3) -CX_EXPORT size_t cxListClone(CxList *dst, const CxList *src, +CX_EXPORT int cxListClone(CxList *dst, const CxList *src, cx_clone_func clone_func, const CxAllocator *clone_allocator, void *data); #ifdef __cplusplus