273 cxmutstr: cx_kv_list_set_key_mustr, \ |
273 cxmutstr: cx_kv_list_set_key_mustr, \ |
274 char*: cx_kv_list_set_key_str, \ |
274 char*: cx_kv_list_set_key_str, \ |
275 const char*: cx_kv_list_set_key_str) \ |
275 const char*: cx_kv_list_set_key_str) \ |
276 (list, index, key) |
276 (list, index, key) |
277 |
277 |
|
278 cx_attr_nonnull |
278 static inline int cx_kv_list_set_key_cxstr(CxList *list, size_t index, cxstring key) { |
279 static inline int cx_kv_list_set_key_cxstr(CxList *list, size_t index, cxstring key) { |
279 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key)); |
280 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key)); |
280 } |
281 } |
281 |
282 |
|
283 cx_attr_nonnull |
282 static inline int cx_kv_list_set_key_mustr(CxList *list, size_t index, cxmutstr key) { |
284 static inline int cx_kv_list_set_key_mustr(CxList *list, size_t index, cxmutstr key) { |
283 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key)); |
285 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key)); |
284 } |
286 } |
285 |
287 |
|
288 cx_attr_nonnull |
|
289 cx_attr_cstr_arg(3) |
286 static inline int cx_kv_list_set_key_str(CxList *list, size_t index, const char *key) { |
290 static inline int cx_kv_list_set_key_str(CxList *list, size_t index, const char *key) { |
287 return cx_kv_list_set_key(list, index, cx_hash_key_str(key)); |
291 return cx_kv_list_set_key(list, index, cx_hash_key_str(key)); |
288 } |
292 } |
289 |
293 |
290 /** |
294 /** |
305 cxmutstr: cx_kv_list_remove_key_mustr, \ |
309 cxmutstr: cx_kv_list_remove_key_mustr, \ |
306 char*: cx_kv_list_remove_key_str, \ |
310 char*: cx_kv_list_remove_key_str, \ |
307 const char*: cx_kv_list_remove_key_str) \ |
311 const char*: cx_kv_list_remove_key_str) \ |
308 (list, index, key) |
312 (list, index, key) |
309 |
313 |
|
314 cx_attr_nonnull |
310 static inline int cx_kv_list_remove_key_cxstr(CxList *list, size_t index, cxstring key) { |
315 static inline int cx_kv_list_remove_key_cxstr(CxList *list, size_t index, cxstring key) { |
311 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key)); |
316 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key)); |
312 } |
317 } |
313 |
318 |
|
319 cx_attr_nonnull |
314 static inline int cx_kv_list_remove_key_mustr(CxList *list, size_t index, cxmutstr key) { |
320 static inline int cx_kv_list_remove_key_mustr(CxList *list, size_t index, cxmutstr key) { |
315 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key)); |
321 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key)); |
316 } |
322 } |
317 |
323 |
|
324 cx_attr_nonnull |
|
325 cx_attr_cstr_arg(3) |
318 static inline int cx_kv_list_remove_key_str(CxList *list, size_t index, const char *key) { |
326 static inline int cx_kv_list_remove_key_str(CxList *list, size_t index, const char *key) { |
319 return cx_kv_list_remove_key(list, index, cx_hash_key_str(key)); |
327 return cx_kv_list_remove_key(list, index, cx_hash_key_str(key)); |
320 } |
328 } |
321 |
329 |
322 /** |
330 /** |
335 cxmutstr: cx_kv_list_insert_mustr, \ |
343 cxmutstr: cx_kv_list_insert_mustr, \ |
336 char*: cx_kv_list_insert_str, \ |
344 char*: cx_kv_list_insert_str, \ |
337 const char*: cx_kv_list_insert_str) \ |
345 const char*: cx_kv_list_insert_str) \ |
338 (list, index, key, value) |
346 (list, index, key, value) |
339 |
347 |
|
348 cx_attr_nonnull |
340 static inline int cx_kv_list_insert_cxstr(CxList *list, size_t index, cxstring key, void *value) { |
349 static inline int cx_kv_list_insert_cxstr(CxList *list, size_t index, cxstring key, void *value) { |
341 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value); |
350 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value); |
342 } |
351 } |
343 |
352 |
|
353 cx_attr_nonnull |
344 static inline int cx_kv_list_insert_mustr(CxList *list, size_t index, cxmutstr key, void *value) { |
354 static inline int cx_kv_list_insert_mustr(CxList *list, size_t index, cxmutstr key, void *value) { |
345 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value); |
355 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value); |
346 } |
356 } |
347 |
357 |
|
358 cx_attr_nonnull |
|
359 cx_attr_cstr_arg(3) |
348 static inline int cx_kv_list_insert_str(CxList *list, size_t index, const char *key, void *value) { |
360 static inline int cx_kv_list_insert_str(CxList *list, size_t index, const char *key, void *value) { |
349 return cx_kv_list_insert(list, index, cx_hash_key_str(key), value); |
361 return cx_kv_list_insert(list, index, cx_hash_key_str(key), value); |
350 } |
362 } |
351 |
363 |
352 #endif |
364 #endif |