src/ucx/properties.c

changeset 582
82b60a8dd55c
parent 579
e10457d74fe1
child 621
956c03c25edd
equal deleted inserted replaced
581:4a049e416021 582:82b60a8dd55c
285 285
286 static int cx_properties_read_init_file( 286 static int cx_properties_read_init_file(
287 cx_attr_unused CxProperties *prop, 287 cx_attr_unused CxProperties *prop,
288 CxPropertiesSource *src 288 CxPropertiesSource *src
289 ) { 289 ) {
290 src->data_ptr = malloc(src->data_size); 290 src->data_ptr = cxMallocDefault(src->data_size);
291 if (src->data_ptr == NULL) return 1; 291 if (src->data_ptr == NULL) return 1;
292 return 0; 292 return 0;
293 } 293 }
294 294
295 static void cx_properties_read_clean_file( 295 static void cx_properties_read_clean_file(
296 cx_attr_unused CxProperties *prop, 296 cx_attr_unused CxProperties *prop,
297 CxPropertiesSource *src 297 CxPropertiesSource *src
298 ) { 298 ) {
299 free(src->data_ptr); 299 cxFreeDefault(src->data_ptr);
300 } 300 }
301 301
302 CxPropertiesSource cxPropertiesStringSource(cxstring str) { 302 CxPropertiesSource cxPropertiesStringSource(cxstring str) {
303 CxPropertiesSource src; 303 CxPropertiesSource src;
304 src.src = (void*) str.ptr; 304 src.src = (void*) str.ptr;

mercurial