*/
#ifndef _di_f_macro_memory_structure_new_
#define f_macro_memory_structure_new(status, structure, type, length) \
- structure.array = 0; \
- structure.size = 0; \
- structure.used = 0; \
+ f_macro_memory_structure_clear(structure) \
status = f_memory_new((void **) & structure.array, sizeof(type), length); \
if (status == f_none) { \
structure.size = length; \
*/
#ifndef _di_f_macro_memory_structures_new_
#define f_macro_memory_structures_new(status, structures, type, new_length) \
- structures.array = 0; \
- structures.size = 0; \
- structures.used = 0; \
+ f_macro_memory_structures_clear(structures) \
status = f_memory_new((void **) & structures.array, sizeof(type), new_length); \
if (status == f_none) { \
structures.size = new_length; \
}
#endif // _di_f_macro_memory_structures_destroy_simple_
-
/**
* Resize a generic memory structures.
*
dynamics.used = 0;
#define f_macro_string_dynamics_new(status, dynamics, length) \
- dynamics.array = 0; \
- dynamics.size = 0; \
- dynamics.used = 0; \
+ f_macro_string_dynamics_clear(dynamics) \
status = f_memory_new((void **) & dynamics.array, sizeof(f_string_dynamic), length); \
if (status == f_none) { \
dynamics.size = length; \