174 cx_attr_nonnull |
174 cx_attr_nonnull |
175 cx_attr_returns_nonnull |
175 cx_attr_returns_nonnull |
176 cx_attr_export |
176 cx_attr_export |
177 CxMap *cxKvListAsMap(CxList *list); |
177 CxMap *cxKvListAsMap(CxList *list); |
178 |
178 |
|
179 /** |
|
180 * Sets or updates the key of a list item. |
|
181 * |
|
182 * This is, for example, useful when you have inserted an element using the CxList interface, |
|
183 * and now you want to associate this element with a key. |
|
184 * |
|
185 * @param list the list |
|
186 * @param index the index of the element in the list |
|
187 * @param key the key |
|
188 * @retval zero success |
|
189 * @retval non-zero memory allocation failure or the index is out of bounds |
|
190 * @see cxKvListSetKey() |
|
191 */ |
179 cx_attr_nonnull |
192 cx_attr_nonnull |
180 cx_attr_export |
193 cx_attr_export |
181 int cx_kv_list_set_key(CxList *list, size_t index, CxHashKey key); |
194 int cx_kv_list_set_key(CxList *list, size_t index, CxHashKey key); |
182 |
195 |
|
196 /** |
|
197 * Inserts an item into the list at the specified index and associates it with the specified key. |
|
198 * |
|
199 * @param list the list |
|
200 * @param index the index the inserted element shall have |
|
201 * @param key the key |
|
202 * @param value the value |
|
203 * @retval zero success |
|
204 * @retval non-zero memory allocation failure or the index is out of bounds |
|
205 * @see cxKvListInsert() |
|
206 */ |
183 cx_attr_nonnull |
207 cx_attr_nonnull |
184 cx_attr_export |
208 cx_attr_export |
185 int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value); |
209 int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value); |
186 |
210 |
187 /** |
211 /** |