version 1.4, 2014/01/29 14:16:54
|
version 1.6, 2019/01/21 11:57:13
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004 - 2014 | Copyright 2004 - 2019 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 170 array_Destroy(array_t ** __restrict parr)
|
Line 170 array_Destroy(array_t ** __restrict parr)
|
e_free((*parr)->arr_data); |
e_free((*parr)->arr_data); |
e_free(*parr); |
e_free(*parr); |
*parr = NULL; |
*parr = NULL; |
|
} |
|
|
|
/* |
|
* array_Reset() - Reset array to initial state |
|
* |
|
* @parr = Array |
|
* @purge = Purge data, if <>0 then will be free entire data memory |
|
* return: none |
|
*/ |
|
void |
|
array_Reset(array_t * __restrict arr, int purge) |
|
{ |
|
if (!arr) |
|
return; |
|
|
|
arr->arr_last = -1; |
|
arr->arr_num = 0; |
|
|
|
if (purge && arr->arr_data) { |
|
e_free(arr->arr_data); |
|
arr->arr_data = e_calloc(array_Size(arr), sizeof(intptr_t)); |
|
} |
|
|
|
array_Zero(arr); |
} |
} |
|
|
/* |
/* |