431 // initialize base members |
431 // initialize base members |
432 map->base.cl = &cx_hash_map_class; |
432 map->base.cl = &cx_hash_map_class; |
433 map->base.collection.allocator = allocator; |
433 map->base.collection.allocator = allocator; |
434 |
434 |
435 if (itemsize > 0) { |
435 if (itemsize > 0) { |
436 map->base.collection.store_pointer = false; |
|
437 map->base.collection.elem_size = itemsize; |
436 map->base.collection.elem_size = itemsize; |
438 } else { |
437 } else { |
|
438 map->base.collection.elem_size = sizeof(void *); |
439 map->base.collection.store_pointer = true; |
439 map->base.collection.store_pointer = true; |
440 map->base.collection.elem_size = sizeof(void *); |
|
441 } |
440 } |
442 |
441 |
443 return (CxMap *) map; |
442 return (CxMap *) map; |
444 } |
443 } |
445 |
444 |