ucx/map.c

changeset 845
f3ab28ed22e5
parent 471
063a9f29098c
child 870
e167cf006213
equal deleted inserted replaced
844:3106d9ca2f9c 845:f3ab28ed22e5
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