--- libaitio/inc/aitio.h 2011/08/26 12:24:44 1.10.2.3 +++ libaitio/inc/aitio.h 2011/08/26 13:19:34 1.10.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.10.2.3 2011/08/26 12:24:44 misho Exp $ +* $Id: aitio.h,v 1.10.2.5 2011/08/26 13:19:34 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -274,11 +274,12 @@ int io_arrayVacuum(array_t * __restrict arr, int fromW #define io_arraySize(_arr) (assert((_arr)), (_arr)->arr_num) -#define io_arrayGet(_arr, _d, _type) (assert((_arr) && (_arr)->arr_num > _d), \ +#define io_arrayGet(_arr, _d) (assert((_arr) && (_arr)->arr_num > _d), *((_arr)->arr_data + _d)) +#define io_array(_arr, _d, _type) (assert((_arr) && (_arr)->arr_num > _d), \ ((_type) *((_arr)->arr_data + _d))) #define io_arraySet(_arr, _d, _ptr) do { \ assert((_arr) && (_arr)->arr_num > _d); \ - *((_arr)->arr_data + _d) = (void*) _ptr; \ + *((_arr)->arr_data + _d) = (void*) (_ptr); \ } while (0) #define io_arrayDel(_arr, _d, _fri) do { \ assert((_arr) && (_arr)->arr_num > _d); \ @@ -398,10 +399,11 @@ array_t *io_sarr2array(sarr_t ** __restrict sa, int sa /* * io_array2sarr() - Convert from dynamic array to split-order array * @a = array + * @segLen = Length of segment * @arrFree = after convert array !=0 will be destroyed * return: NULL error or != NULL new sarr */ -sarr_t *io_array2sarr(array_t ** __restrict a, int arrFree); +sarr_t *io_array2sarr(array_t ** __restrict a, int segLen, int arrFree); /* * io_CopyEnv() Copy environment to new environment array;