src/kv_list.c

changeset 1353
5a13b9c1c57b
parent 1352
8428516137dd
equal deleted inserted replaced
1352:8428516137dd 1353:5a13b9c1c57b
226 // combine the list and the map aspect 226 // combine the list and the map aspect
227 kv_list->map = kv_map; 227 kv_list->map = kv_map;
228 kv_map->list = kv_list; 228 kv_map->list = kv_list;
229 229
230 // remember the base methods and override them 230 // remember the base methods and override them
231 kv_list->list_methods = list->cl;
232 kv_list->map_methods = map->cl; 231 kv_list->map_methods = map->cl;
233 list->cl = &cx_kv_list_class; 232 if (list->climpl == NULL) {
233 kv_list->list_methods = list->cl;
234 list->cl = &cx_kv_list_class;
235 } else {
236 kv_list->list_methods = list->climpl;
237 list->climpl = &cx_kv_list_class;
238 }
234 // TODO: override all map members 239 // TODO: override all map members
235 // and remember to set the sorted flag of the list to false in the put/emplace methods! 240 // and remember to set the sorted flag of the list to false in the put/emplace methods!
236 241
237 return list; 242 return list;
238 } 243 }

mercurial