src/cx/kv_list.h

changeset 1426
3a89b31f0724
parent 1424
563033aa998c
--- a/src/cx/kv_list.h	Wed Oct 15 22:45:21 2025 +0200
+++ b/src/cx/kv_list.h	Thu Oct 16 19:57:47 2025 +0200
@@ -66,15 +66,9 @@
  * @see cxKvListAsMap()
  * @see cxKvListAsList()
  */
-cx_attr_nodiscard
-cx_attr_malloc
-cx_attr_dealloc(cxListFree, 1)
-cx_attr_export
-CxList *cxKvListCreate(
-        const CxAllocator *allocator,
-        cx_compare_func comparator,
-        size_t elem_size
-);
+cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxListFree, 1)
+CX_EXPORT CxList *cxKvListCreate(const CxAllocator *allocator,
+        cx_compare_func comparator, size_t elem_size);
 
 /**
  * Allocates a linked list with a lookup-map for storing elements with @p elem_size bytes each.
@@ -97,15 +91,9 @@
  * @see cxKvListAsMap()
  * @see cxKvListAsList()
  */
-cx_attr_nodiscard
-cx_attr_malloc
-cx_attr_dealloc(cxMapFree, 1)
-cx_attr_export
-CxMap *cxKvListCreateAsMap(
-        const CxAllocator *allocator,
-        cx_compare_func comparator,
-        size_t elem_size
-);
+cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxMapFree, 1)
+CX_EXPORT CxMap *cxKvListCreateAsMap(const CxAllocator *allocator,
+        cx_compare_func comparator, size_t elem_size);
 
 /**
  * Allocates a linked list with a lookup-map for storing elements with @p elem_size bytes each.
@@ -158,11 +146,8 @@
  * @param map a map pointer that was returned by a call to cxKvListAsMap()
  * @return the original list pointer
  */
-cx_attr_nodiscard
-cx_attr_nonnull
-cx_attr_returns_nonnull
-cx_attr_export
-CxList *cxKvListAsList(CxMap *map);
+cx_attr_nodiscard cx_attr_nonnull cx_attr_returns_nonnull
+CX_EXPORT CxList *cxKvListAsList(CxMap *map);
 
 /**
  * Converts a map pointer belonging to a key-value-List back to the original list pointer.
@@ -170,11 +155,8 @@
  * @param list a list created by cxKvListCreate() or cxKvListCreateSimple()
  * @return a map pointer that lets you use the list as if it was a map
  */
-cx_attr_nodiscard
-cx_attr_nonnull
-cx_attr_returns_nonnull
-cx_attr_export
-CxMap *cxKvListAsMap(CxList *list);
+cx_attr_nodiscard cx_attr_nonnull cx_attr_returns_nonnull
+CX_EXPORT CxMap *cxKvListAsMap(CxList *list);
 
 /**
  * Sets or updates the key of a list item.
@@ -190,8 +172,7 @@
  * @see cxKvListSetKey()
  */
 cx_attr_nonnull
-cx_attr_export
-int cx_kv_list_set_key(CxList *list, size_t index, CxHashKey key);
+CX_EXPORT int cx_kv_list_set_key(CxList *list, size_t index, CxHashKey key);
 
 /**
  * Inserts an item into the list at the specified index and associates it with the specified key.
@@ -205,8 +186,7 @@
  * @see cxKvListInsert()
  */
 cx_attr_nonnull
-cx_attr_export
-int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value);
+CX_EXPORT int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value);
 
 /**
  * Sets or updates the key of a list item.
@@ -250,8 +230,7 @@
  * @retval non-zero the index is out of bounds
  */
 cx_attr_nonnull
-cx_attr_export
-int cxKvListRemoveKey(CxList *list, size_t index);
+CX_EXPORT int cxKvListRemoveKey(CxList *list, size_t index);
 
 /**
  * Returns the key of a list item.
@@ -261,8 +240,7 @@
  * @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);
+CX_EXPORT const CxHashKey *cxKvListGetKey(CxList *list, size_t index);
 
 /**
  * Adds an item into the list and associates it with the specified key.

mercurial