242 cxstring value |
242 cxstring value |
243 ) { |
243 ) { |
244 CxMap *map = sink->sink; |
244 CxMap *map = sink->sink; |
245 CxAllocator *alloc = sink->data; |
245 CxAllocator *alloc = sink->data; |
246 cxmutstr v = cx_strdup_a(alloc, value); |
246 cxmutstr v = cx_strdup_a(alloc, value); |
247 int r = cx_map_put_cxstr(map, key, v.ptr); |
247 int r = cxMapPut(map, key, v.ptr); |
248 if (r != 0) cx_strfree_a(alloc, &v); |
248 if (r != 0) cx_strfree_a(alloc, &v); |
249 return r; |
249 return r; |
250 } |
250 } |
251 |
251 |
252 CxPropertiesSink cxPropertiesMapSink(CxMap *map) { |
252 CxPropertiesSink cxPropertiesMapSink(CxMap *map) { |