diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-27 12:24:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-27 12:24:02 +0100 |
commit | c111a765eb9cc6e8d362a427ab435db959415fd9 (patch) | |
tree | 5a9975ee1833caffcf74756a6cb8cd2457647001 /src/libstat/tokenizers | |
parent | ce3b4dafbb83c471ff5010a001607999909265e5 (diff) | |
download | rspamd-c111a765eb9cc6e8d362a427ab435db959415fd9.tar.gz rspamd-c111a765eb9cc6e8d362a427ab435db959415fd9.zip |
Start tokenizers rework.
Diffstat (limited to 'src/libstat/tokenizers')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstat/tokenizers/tokenizers.h b/src/libstat/tokenizers/tokenizers.h index ef3fc8af0..1f4b0a54f 100644 --- a/src/libstat/tokenizers/tokenizers.h +++ b/src/libstat/tokenizers/tokenizers.h @@ -15,10 +15,11 @@ struct rspamd_stat_tokenizer { gpointer (*get_config) (struct rspamd_tokenizer_config *cf, gsize *len); gboolean (*compatible_config) (struct rspamd_tokenizer_config *cf, gpointer ptr, gsize len); - gint (*tokenize_func)(struct rspamd_tokenizer_config *cf, + gboolean (*load_config) (struct rspamd_tokenizer_runtime *rt, + gpointer ptr, gsize len); + gint (*tokenize_func)(struct rspamd_tokenizer_runtime *rt, rspamd_mempool_t *pool, GArray *words, - GTree *result, gboolean is_utf, const gchar *prefix); }; @@ -33,10 +34,9 @@ GArray * rspamd_tokenize_text (gchar *text, gsize len, gboolean is_utf, gboolean check_signature); /* OSB tokenize function */ -gint rspamd_tokenizer_osb (struct rspamd_tokenizer_config *cf, +gint rspamd_tokenizer_osb (struct rspamd_tokenizer_runtime *rt, rspamd_mempool_t *pool, GArray *input, - GTree *tokens, gboolean is_utf, const gchar *prefix); @@ -47,6 +47,10 @@ gboolean rspamd_tokenizer_osb_compatible_config (struct rspamd_tokenizer_config *cf, gpointer ptr, gsize len); +gboolean +rspamd_tokenizer_osb_load_config (struct rspamd_tokenizer_runtime *rt, + gpointer ptr, gsize len); + #endif /* * vi:ts=4 |