312 *map_data = node_data; |
312 *map_data = node_data; |
313 |
313 |
314 // copy the key to the node data |
314 // copy the key to the node data |
315 CxHashKey *key_ptr = cx_kv_list_loc_key(kv_list, node_data); |
315 CxHashKey *key_ptr = cx_kv_list_loc_key(kv_list, node_data); |
316 *key_ptr = key; |
316 *key_ptr = key; |
317 return map_data; |
317 |
|
318 // we must return node_data here and not map_data, |
|
319 // because the node_data is the actual element of this collection |
|
320 return node_data; |
318 } |
321 } |
319 |
322 |
320 void *cx_kvl_map_get(const CxMap *map, CxHashKey key) { |
323 void *cx_kvl_map_get(const CxMap *map, CxHashKey key) { |
321 cx_kv_list *kv_list = ((struct cx_kv_list_map_s*)map)->list; |
324 cx_kv_list *kv_list = ((struct cx_kv_list_map_s*)map)->list; |
322 void *node_data = kv_list->map_methods->get(map, key); |
325 void *node_data = kv_list->map_methods->get(map, key); |