ucx/properties.c

changeset 125
fca8efb122de
parent 117
ec0ae0c8854e
child 130
633f15ce2ee4
equal deleted inserted replaced
124:8b44653541ef 125:fca8efb122de
199 199
200 int ucx_properties2map(UcxProperties *parser, UcxMap *map) { 200 int ucx_properties2map(UcxProperties *parser, UcxMap *map) {
201 sstr_t name; 201 sstr_t name;
202 sstr_t value; 202 sstr_t value;
203 while(ucx_properties_next(parser, &name, &value)) { 203 while(ucx_properties_next(parser, &name, &value)) {
204 value = sstrdupa(map->allocator, value); 204 value = sstrdup_a(map->allocator, value);
205 if(!value.ptr) { 205 if(!value.ptr) {
206 return 1; 206 return 1;
207 } 207 }
208 if(ucx_map_sstr_put(map, name, value.ptr)) { 208 if(ucx_map_sstr_put(map, name, value.ptr)) {
209 map->allocator->free(map->allocator->pool, value.ptr); 209 map->allocator->free(map->allocator->pool, value.ptr);

mercurial