src/cx/kv_list.h

changeset 1354
b024e573dcb2
parent 1348
a1da355ed3b8
child 1355
ea359a27b264
equal deleted inserted replaced
1353:5a13b9c1c57b 1354:b024e573dcb2
205 static inline int cxKvListSetKey(CxList *list, size_t index, cxmutstr key) { 205 static inline int cxKvListSetKey(CxList *list, size_t index, cxmutstr key) {
206 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key)); 206 return cx_kv_list_set_key(list, index, cx_hash_key_cxstr(key));
207 } 207 }
208 208
209 cx_attr_nonnull 209 cx_attr_nonnull
210 cx_attr_cstr_arg(2) 210 cx_attr_cstr_arg(3)
211 static inline int cxKvListSetKey(CxList *list, size_t index, const char *key) { 211 static inline int cxKvListSetKey(CxList *list, size_t index, const char *key) {
212 return cx_kv_list_set_key(list, index, cx_hash_key_str(key)); 212 return cx_kv_list_set_key(list, index, cx_hash_key_str(key));
213 } 213 }
214 214
215 cx_attr_nonnull 215 cx_attr_nonnull
226 static inline int cxKvListRemoveKey(CxList *list, size_t index, cxmutstr key) { 226 static inline int cxKvListRemoveKey(CxList *list, size_t index, cxmutstr key) {
227 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key)); 227 return cx_kv_list_remove_key(list, index, cx_hash_key_cxstr(key));
228 } 228 }
229 229
230 cx_attr_nonnull 230 cx_attr_nonnull
231 cx_attr_cstr_arg(2) 231 cx_attr_cstr_arg(3)
232 static inline int cxKvListRemoveKey(CxList *list, size_t index, const char *key) { 232 static inline int cxKvListRemoveKey(CxList *list, size_t index, const char *key) {
233 return cx_kv_list_remove_key(list, index, cx_hash_key_str(key)); 233 return cx_kv_list_remove_key(list, index, cx_hash_key_str(key));
234 } 234 }
235 235
236 cx_attr_nonnull 236 cx_attr_nonnull
247 static inline int cxKvListInsert(CxList *list, size_t index, cxmutstr key, void *value) { 247 static inline int cxKvListInsert(CxList *list, size_t index, cxmutstr key, void *value) {
248 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value); 248 return cx_kv_list_insert(list, index, cx_hash_key_cxstr(key), value);
249 } 249 }
250 250
251 cx_attr_nonnull 251 cx_attr_nonnull
252 cx_attr_cstr_arg(2) 252 cx_attr_cstr_arg(3)
253 static inline int cxKvListInsert(CxList *list, size_t index, const char *key, void *value) { 253 static inline int cxKvListInsert(CxList *list, size_t index, const char *key, void *value) {
254 return cx_kv_list_insert(list, index, cx_hash_key_str(key), value); 254 return cx_kv_list_insert(list, index, cx_hash_key_str(key), value);
255 } 255 }
256 256
257 #else /* ! __cplusplus */ 257 #else /* ! __cplusplus */

mercurial