src/properties.c

changeset 1559
9e50f45f8736
parent 1558
fc863c877a75
equal deleted inserted replaced
1558:fc863c877a75 1559:9e50f45f8736
252 #endif 252 #endif
253 const unsigned cx_properties_load_buf_size = CX_PROPERTIES_LOAD_BUF_SIZE; 253 const unsigned cx_properties_load_buf_size = CX_PROPERTIES_LOAD_BUF_SIZE;
254 254
255 CxPropertiesStatus cx_properties_load(CxPropertiesConfig config, 255 CxPropertiesStatus cx_properties_load(CxPropertiesConfig config,
256 const CxAllocator *allocator, cxstring filename, CxMap *target) { 256 const CxAllocator *allocator, cxstring filename, CxMap *target) {
257 if (allocator == NULL) {
258 allocator = cxDefaultAllocator;
259 }
260
257 // sanity check for the map 261 // sanity check for the map
258 const bool use_cstring = cxCollectionStoresPointers(target); 262 const bool use_cstring = cxCollectionStoresPointers(target);
259 if (!use_cstring && cxCollectionElementSize(target) != sizeof(cxmutstr)) { 263 if (!use_cstring && cxCollectionElementSize(target) != sizeof(cxmutstr)) {
260 return CX_PROPERTIES_MAP_ERROR; 264 return CX_PROPERTIES_MAP_ERROR;
261 } 265 }

mercurial