ui/common/ucx_properties.c

branch
newapi
changeset 325
99a93a9250c4
parent 174
0358f1d9c506
equal deleted inserted replaced
324:ce13a778654a 325:99a93a9250c4
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