src/cx/kv_list.h

changeset 1394
7b23c6db9500
parent 1392
30c20aac31b6
--- a/src/cx/kv_list.h	Wed Sep 24 23:52:36 2025 +0200
+++ b/src/cx/kv_list.h	Thu Sep 25 14:30:28 2025 +0200
@@ -283,6 +283,17 @@
 int cxKvListRemoveKey(CxList *list, size_t index);
 
 /**
+ * Returns the key of a list item.
+ *
+ * @param list the list
+ * @param index the index of the element in the list
+ * @return a pointer to the key or @c NULL when the index is out of bounds or the item does not have a key
+ */
+cx_attr_nonnull
+cx_attr_export
+const CxHashKey *cxKvListGetKey(CxList *list, size_t index);
+
+/**
  * Inserts an item into the list at the specified index and associates it with the specified key.
  *
  * @param list (@c CxList*) the list

mercurial