diff options
author | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2018-08-07 10:52:54 +0300 |
---|---|---|
committer | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2018-08-07 10:52:54 +0300 |
commit | 4999d9654fe87d33d8955169d2392dd2835d3748 (patch) | |
tree | 90d5395adb1e20e52a2c1e794ba3bca28b7eb47c /include/zbxalgo.h | |
parent | 7b8ac29d4213f0211a81c0b15cda621ec003fe93 (diff) |
...G...PS. [DEV-699] removed typed function zbx_XXX _free() from VECTOR implementation
Diffstat (limited to 'include/zbxalgo.h')
-rw-r--r-- | include/zbxalgo.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/zbxalgo.h b/include/zbxalgo.h index 159786691d5..e1cb2da6a25 100644 --- a/include/zbxalgo.h +++ b/include/zbxalgo.h @@ -322,10 +322,7 @@ ZBX_VECTOR_DECL(__id, __type); \ \ typedef void (*zbx_clean_ ## __id ## _func_t)(__type data); \ \ -void zbx_vector_ ## __id ## _clear_ext(zbx_vector_ ## __id ## _t *vector, zbx_clean_ ## __id ## _func_t clean_func);\ -/* this function is only for use with zbx_vector_XXX_clear_ext() */ \ -/* and only if the vector does not contain nested allocations */ \ -void zbx_ ## __id ## _free(__type data); +void zbx_vector_ ## __id ## _clear_ext(zbx_vector_ ## __id ## _t *vector, zbx_clean_ ## __id ## _func_t clean_func); ZBX_VECTOR_DECL(uint64, zbx_uint64_t); ZBX_PTR_VECTOR_DECL(str, char *); @@ -333,6 +330,11 @@ ZBX_PTR_VECTOR_DECL(ptr, void *); ZBX_VECTOR_DECL(ptr_pair, zbx_ptr_pair_t); ZBX_VECTOR_DECL(uint64_pair, zbx_uint64_pair_t); +/* this function is only for use with zbx_vector_XXX_clear_ext() */ +/* and only if the vector does not contain nested allocations */ +void zbx_ptr_free(void *data); +void zbx_str_free(char *data); + /* 128 bit unsigned integer handling */ #define uset128(base, hi64, lo64) (base)->hi = hi64; (base)->lo = lo64 |