src/hash_map.c

changeset 1111
78eeeb950883
parent 1088
881994685681
child 1114
ad5eeb256242
equal deleted inserted replaced
1110:a0e9be7ed131 1111:78eeeb950883
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

mercurial