Cedro
Macros
array.h File Reference

Go to the source code of this file.

Macros

#define DEFINE_ARRAY_OF(T, PADDING, DESTRUCT_BLOCK)
 

Macro Definition Documentation

◆ DEFINE_ARRAY_OF

#define DEFINE_ARRAY_OF (   T,
  PADDING,
  DESTRUCT_BLOCK 
)

DESTRUCT_BLOCK is a block of code that releases the resources for a block of objects of type T, between mut_T_p cursor and T_p end.
For instance:
{ while (cursor != end) destruct_T(cursor++); }
If the type does not need any clean-up, just use {}.
Defines the types:
mut_T_array, mut_T_array_p, mut_T_array_mut_p,
T_array, T_array_p, T_array_mut_p