ucx/map.c

changeset 112
c3f2f16fa4b8
parent 102
64ded9f6a6c6
child 113
dde28a806552
equal deleted inserted replaced
111:81c4f73236a4 112:c3f2f16fa4b8
83 CxMap *const cxEmptyMap = &cx_empty_map; 83 CxMap *const cxEmptyMap = &cx_empty_map;
84 84
85 // </editor-fold> 85 // </editor-fold>
86 86
87 CxMapIterator cxMapMutIteratorValues(CxMap *map) { 87 CxMapIterator cxMapMutIteratorValues(CxMap *map) {
88 if (map == NULL) map = cxEmptyMap;
88 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES); 89 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
89 it.base.mutating = true; 90 it.base.mutating = true;
90 return it; 91 return it;
91 } 92 }
92 93
93 CxMapIterator cxMapMutIteratorKeys(CxMap *map) { 94 CxMapIterator cxMapMutIteratorKeys(CxMap *map) {
95 if (map == NULL) map = cxEmptyMap;
94 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS); 96 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
95 it.base.mutating = true; 97 it.base.mutating = true;
96 return it; 98 return it;
97 } 99 }
98 100
99 CxMapIterator cxMapMutIterator(CxMap *map) { 101 CxMapIterator cxMapMutIterator(CxMap *map) {
102 if (map == NULL) map = cxEmptyMap;
100 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS); 103 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
101 it.base.mutating = true; 104 it.base.mutating = true;
102 return it; 105 return it;
103 } 106 }
104 107

mercurial