| 5 |
5 |
| 6 ```C |
6 ```C |
| 7 #include <cx/kv_list.h> |
7 #include <cx/kv_list.h> |
| 8 |
8 |
| 9 CxList *cxKvListCreate(const CxAllocator *allocator, |
9 CxList *cxKvListCreate(const CxAllocator *allocator, |
| 10 cx_compare_func comparator, size_t elem_size); |
10 size_t elem_size); |
| 11 |
|
| 12 CxList *cxKvListCreateSimple(size_t elem_size); |
|
| 13 |
11 |
| 14 CxMap *cxKvListCreateAsMap(const CxAllocator *allocator, |
12 CxMap *cxKvListCreateAsMap(const CxAllocator *allocator, |
| 15 cx_compare_func comparator, size_t elem_size); |
13 size_t elem_size); |
| 16 |
|
| 17 CxMap *cxKvListCreateAsMapSimple(size_t elem_size); |
|
| 18 ``` |
14 ``` |
| 19 |
15 |
| 20 The lists are created as usual linked lists with an additional map to look up items by key. |
16 The lists are created as usual linked lists with an additional map to look up items by key. |
| 21 The map is created with the same allocator as the list. |
17 The map is created with the same allocator as the list. |
| 22 You can use either interface to access the list. |
18 You can use either interface to access the list. |