src/kv_list.c

changeset 1393
461d256e32c6
parent 1386
748d0d40881e
equal deleted inserted replaced
1392:30c20aac31b6 1393:461d256e32c6
648 memset(loc_key, 0, sizeof(CxHashKey)); 648 memset(loc_key, 0, sizeof(CxHashKey));
649 return 0; 649 return 0;
650 } 650 }
651 651
652 int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value) { 652 int cx_kv_list_insert(CxList *list, size_t index, CxHashKey key, void *value) {
653 // assume we are losing the sorted property
654 list->collection.sorted = false;
655
653 cx_kv_list *kv_list = (cx_kv_list*)list; 656 cx_kv_list *kv_list = (cx_kv_list*)list;
654 657
655 // reserve memory in the map 658 // reserve memory in the map
656 void **map_data = kv_list->map_methods->put(&kv_list->map->map_base.base, key, NULL); 659 void **map_data = kv_list->map_methods->put(&kv_list->map->map_base.base, key, NULL);
657 if (map_data == NULL) return 1; // LCOV_EXCL_LINE 660 if (map_data == NULL) return 1; // LCOV_EXCL_LINE

mercurial