diff options
author | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2018-06-05 14:48:28 +0300 |
---|---|---|
committer | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2018-06-05 14:48:28 +0300 |
commit | edf9f9ec560d9819d362916ae8df2dc8b69ab14c (patch) | |
tree | c18ffd071d7cf5281eb82922b0c9523e4bd47269 /include/zbxalgo.h | |
parent | 7b5d6ae9f206648293be6e50e6ebee43dd61e03b (diff) |
...G...PS. [DEV-699] refactoring of 'zbx_vector_ptr_t' for 'ZBX_ACTIVE_METRIC'
Diffstat (limited to 'include/zbxalgo.h')
-rw-r--r-- | include/zbxalgo.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/zbxalgo.h b/include/zbxalgo.h index 181cead1766..d9ab8b6969b 100644 --- a/include/zbxalgo.h +++ b/include/zbxalgo.h @@ -272,6 +272,8 @@ void zbx_binary_heap_clear(zbx_binary_heap_t *heap); #define ZBX_VECTOR_DECL(__id, __type) \ \ +typedef void (*zbx_clean_ ## __id ## _func_t)(__type *data); \ + \ typedef struct \ { \ __type *values; \ @@ -312,7 +314,9 @@ void zbx_vector_ ## __id ## _setdiff(zbx_vector_ ## __id ## _t *left, const zbx_ zbx_compare_func_t compare_func); \ \ void zbx_vector_ ## __id ## _reserve(zbx_vector_ ## __id ## _t *vector, size_t size); \ -void zbx_vector_ ## __id ## _clear(zbx_vector_ ## __id ## _t *vector); +void zbx_vector_ ## __id ## _clear(zbx_vector_ ## __id ## _t *vector); \ +void zbx_vector_ ## __id ## _clear_type(zbx_vector_ ## __id ## _t *vector, zbx_clean_ ## __id ## _func_t clean_func); + #define ZBX_PTR_VECTOR_DECL(__id, __type) \ \ |