version 1.1.2.4, 2011/05/03 14:48:49
|
version 1.2, 2011/05/03 15:41:00
|
Line 156 io_sarrGet(sarr_t * __restrict arr, u_int idx)
|
Line 156 io_sarrGet(sarr_t * __restrict arr, u_int idx)
|
} |
} |
|
|
/* |
/* |
|
* io_sarrGet2() - Always get element from dynamic split-order array |
|
* Function automatic grow array. Good use for Hash tables! |
|
* @arr = Array |
|
* @idx = Index (warning 1st element is at position 1) |
|
* return: NULL not found, !=NULL element |
|
*/ |
|
void * |
|
io_sarrGet2(sarr_t * __restrict arr, u_int idx) |
|
{ |
|
assert(arr); |
|
if (!arr || idx < 1) |
|
return NULL; |
|
if (arr->sarr_num < idx) |
|
if (io_sarrGrow(arr, idx)) |
|
return NULL; |
|
return io_sarrGet(arr, idx); |
|
} |
|
|
|
/* |
* io_sarrSet() - Set element to dynamic split-order array |
* io_sarrSet() - Set element to dynamic split-order array |
* @arr = Array |
* @arr = Array |
* @idx = Index (warning 1st element is at position 1) |
* @idx = Index (warning 1st element is at position 1) |