diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-05 00:44:00 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-05 00:44:00 +0000 |
commit | 0943c1627ca1ebedd76f3d544ec801210365daee (patch) | |
tree | c27c7ea1bcf6e4bf85f674b3d5290ba28b00405f /src/libserver/re_cache.h | |
parent | 1ad346fee7307cebef07833774510975365dcdfc (diff) | |
download | rspamd-0943c1627ca1ebedd76f3d544ec801210365daee.tar.gz rspamd-0943c1627ca1ebedd76f3d544ec801210365daee.zip |
Add replacement method for expressions in the confi
Diffstat (limited to 'src/libserver/re_cache.h')
-rw-r--r-- | src/libserver/re_cache.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libserver/re_cache.h b/src/libserver/re_cache.h index 4fa3fc286..6f2c0f312 100644 --- a/src/libserver/re_cache.h +++ b/src/libserver/re_cache.h @@ -56,6 +56,22 @@ void rspamd_re_cache_add (struct rspamd_re_cache *cache, rspamd_regexp_t *re, enum rspamd_re_type type, gpointer type_data, gsize datalen); /** + * Replace regexp in the cache with another regexp + * @param cache cache object + * @param what re to replace + * @param type type of object + * @param type_data associated data with the type (e.g. header name) + * @param datalen associated data length + * @param with regexp object to replace the origin + */ +void rspamd_re_cache_replace (struct rspamd_re_cache *cache, + rspamd_regexp_t *what, + enum rspamd_re_type type, + gpointer type_data, + gsize datalen, + rspamd_regexp_t *with); + +/** * Initialize and optimize re cache structure */ void rspamd_re_cache_init (struct rspamd_re_cache *cache); |