--- libelwix/inc/elwix/aarray.h 2019/01/23 17:34:41 1.9.4.1 +++ libelwix/inc/elwix/aarray.h 2019/09/24 15:49:52 1.11 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aarray.h,v 1.9.4.1 2019/01/23 17:34:41 misho Exp $ +* $Id: aarray.h,v 1.11 2019/09/24 15:49:52 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -72,6 +72,7 @@ typedef struct _tagArray { e_free((_arr)->arr_data[__d]); \ (_arr)->arr_data[__d] = NULL; \ } while (0) +#define array_Var(_arr, _d) (assert((_arr) && (_arr)->arr_num > _d), (ait_val_t*) (_arr)->arr_data[_d]) /* * array_Init() - Create and initialize dynamic array @@ -96,6 +97,13 @@ array_t *array_Init2(array_t * __restrict arr, int num */ void array_Destroy(array_t ** __restrict parr); /* + * array_Destroy2() - Free data in dynamic array + * + * @parr = Array + * return: none + */ +void array_Destroy2(array_t * __restrict arr); +/* * array_Free() - Free all data in dynamic array items * (WARNING! If assign static array dont use this!!!) * @@ -107,7 +115,7 @@ void array_Free(array_t * __restrict arr); * array_Reset() - Reset array to initial state * * @parr = Array - * @purge = Purge data, if <>0 then will be free entire data memory + * @purge = Purge all data, if <>0 then will be free entire data memory * return: none */ void array_Reset(array_t * __restrict arr, int purge);