diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 12:35:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 12:35:13 +0100 |
commit | d4d921a97e5a8548fb506ed8bc747d9a2bc37561 (patch) | |
tree | b3647b472e4e08680d0ce4464a353a5cbc05a35a /src/libmime/scan_result_private.h | |
parent | 22ef30cfeca05d3eaa6fc570959232798cc82de3 (diff) | |
download | rspamd-d4d921a97e5a8548fb506ed8bc747d9a2bc37561.tar.gz rspamd-d4d921a97e5a8548fb506ed8bc747d9a2bc37561.zip |
[Rework] Rename filter.h to a more sane name
Diffstat (limited to 'src/libmime/scan_result_private.h')
-rw-r--r-- | src/libmime/scan_result_private.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libmime/scan_result_private.h b/src/libmime/scan_result_private.h new file mode 100644 index 000000000..aa90430e1 --- /dev/null +++ b/src/libmime/scan_result_private.h @@ -0,0 +1,39 @@ +// +// Created by Vsevolod Stakhov on 2019-01-14. +// + +#ifndef RSPAMD_SCAN_RESULT_PRIVATE_H +#define RSPAMD_SCAN_RESULT_PRIVATE_H + +#include "scan_result.h" +#include "contrib/libucl/khash.h" + +#ifdef __cplusplus +extern "C" { +#endif + +KHASH_MAP_INIT_STR (rspamd_options_hash, struct rspamd_symbol_option *); +/** + * Result of metric processing + */ +KHASH_MAP_INIT_STR (rspamd_symbols_hash, struct rspamd_symbol_result); +#if UINTPTR_MAX <= UINT_MAX +/* 32 bit */ +#define rspamd_ptr_hash_func(key) (khint32_t)(((uintptr_t)(key))>>1) +#else +/* likely 64 bit */ +#define rspamd_ptr_hash_func(key) (khint32_t)(((uintptr_t)(key))>>3) +#endif +#define rspamd_ptr_equal_func(a, b) ((a) == (b)) +KHASH_INIT (rspamd_symbols_group_hash, + void *, + double, + 1, + rspamd_ptr_hash_func, + rspamd_ptr_equal_func); + +#ifdef __cplusplus +} +#endif + +#endif //RSPAMD_SCAN_RESULT_PRIVATE_H |