src/kv_list.c

changeset 1600
a1a728d7ebfd
parent 1587
7156d6699410
child 1605
55b13f583356
equal deleted inserted replaced
1599:aa55109f01d0 1600:a1a728d7ebfd
379 379
380 // copy the key to the node data 380 // copy the key to the node data
381 CxHashKey *key_ptr = cx_kv_list_loc_key(kv_list, node_data); 381 CxHashKey *key_ptr = cx_kv_list_loc_key(kv_list, node_data);
382 *key_ptr = *map_entry.key; 382 *key_ptr = *map_entry.key;
383 383
384 return map_entry; 384 // we must return an entry that points to the node data!
385 return (CxMapEntry ){key_ptr, node_data};
385 } 386 }
386 387
387 static void *cx_kvl_iter_current_entry(const void *it) { 388 static void *cx_kvl_iter_current_entry(const void *it) {
388 const CxMapIterator *iter = it; 389 const CxMapIterator *iter = it;
389 return (void*)&iter->entry; 390 return (void*)&iter->entry;

mercurial