ui/common/ucx_properties.c

changeset 49
2f71f4ee247a
parent 0
2483f517c562
equal deleted inserted replaced
48:ae61523bce20 49:2f71f4ee247a
199 199
200 int ucx_properties2map(UcxProperties *parser, CxMap *map) { 200 int ucx_properties2map(UcxProperties *parser, CxMap *map) {
201 cxstring name; 201 cxstring name;
202 cxstring value; 202 cxstring value;
203 while(ucx_properties_next(parser, &name, &value)) { 203 while(ucx_properties_next(parser, &name, &value)) {
204 cxmutstr mutvalue = cx_strdup_a(map->allocator, value); 204 cxmutstr mutvalue = cx_strdup_a(map->collection.allocator, value);
205 if(!mutvalue.ptr) { 205 if(!mutvalue.ptr) {
206 return 1; 206 return 1;
207 } 207 }
208 if(cxMapPut(map, cx_hash_key_cxstr(name), mutvalue.ptr)) { 208 if(cxMapPut(map, cx_hash_key_cxstr(name), mutvalue.ptr)) {
209 cxFree(map->allocator, mutvalue.ptr); 209 cxFree(map->collection.allocator, mutvalue.ptr);
210 return 1; 210 return 1;
211 } 211 }
212 } 212 }
213 if (parser->error) { 213 if (parser->error) {
214 return parser->error; 214 return parser->error;

mercurial