src/cx/list.h

changeset 1287
3a3ffc27813f
parent 1239
b4b1f15d1866
child 1289
2e8edba252a0
--- a/src/cx/list.h	Sat Apr 12 21:32:31 2025 +0200
+++ b/src/cx/list.h	Sun Apr 13 11:09:05 2025 +0200
@@ -689,6 +689,23 @@
     return list->cl->at(list, index);
 }
 
+
+/**
+ * Sets the element at the specified index in the list
+ *
+ * @param list the list to set the element in
+ * @param index the index to set the element at
+ * @param elem element to set
+ * @retval zero on success
+ * @retval non-zero when index is out of bounds
+ */
+cx_attr_nonnull
+int cxListSet(
+        CxList *list,
+        size_t index,
+        const void *elem
+);
+
 /**
  * Returns an iterator pointing to the item at the specified index.
  *

mercurial